SlickUpload
Welcome Guest Search | Active Topics | Log In | Register

how to get uploaded file name Options
kenxt
#1 Posted : Thursday, January 13, 2011 9:14:58 PM
Rank: Newbie

Groups: Registered

Joined: 1/13/2011
Posts: 0

if I configed fileNameMethod="Custom" or fileNameMethod="Guid", how can I get the filename that saved on server disk, then I can write the  uploaded file's information to database.

thanks 

Axosoft
#2 Posted : Sunday, April 24, 2011 10:44:49 AM
Rank: Administration


Groups: Administrators

Joined: 7/7/2005
Posts: 1,586
Location: Scottsdale, AZ

(moved from off topic hell)

Given an UploadedFile instance named "file" (if you're looping through the UploadedFiles collection, for example), you can get the server filename like so:

string fileName = file.LocationInfo[FileUploadStreamProvider.FileNameKey];

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.