|
Rank: Advanced Member Groups: Member
Joined: 3/18/2008 Posts: 41
|
Hello.
When an upload completes, three files are generated on the server: a .data, a .info and a .status file. How is the best way to use these files to give the data file the right original extension and to assosiate this file with the right user (the file name contain an ID, right)?
Regards, HT
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The easiest way is to set FinalFileLocation. Once you set that all files will be moved to FinalFileLocation and renamed to their original name.
This property is added very recently. So try to download the latest version if you do not see this property.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 3/18/2008 Posts: 41
|
Hmm.. are you sure the FinalFileLocation property works? Adding the following path to a directory does not make the files stored in this directory:
FinalFileLocation="~/pub/mediafiles/complete/"
Is it correct that this should be a directory path (not a file path)?
HT
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
The files are only copied when the page submit. Nothing is going to happen before that. So the best way to verify it is to handle FileUploaded event and then check the file when the event handler is hit.
|
|
Rank: Advanced Member Groups: Member
Joined: 3/18/2008 Posts: 41
|
Thank you, it works great! You make this really simple to us :-) .. and your support in this forum is great!
|
|