Welcome Guest Search | Active Topics | Sign In | Register

AjaxUploader Temp Files Names & Moving After Upload Complete? Options
Pointeman
Posted: Friday, February 27, 2009 11:13:57 AM
Rank: Advanced Member
Groups: Member

Joined: 2/27/2009
Posts: 41
The AjaxUploader uploads great, all files are its temp directory, although they are named quite differently.

I need to File.Move the uploaded files from the temp directory to other permanent directories. I cannot move files I cannot identify.

Q. How do I code the OnFileUploaded eventhandler?

Q. Why does the AjaxUploader temp folder not contain my actual file by Name.jpg?


eo_support
Posted: Friday, February 27, 2009 11:25:49 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You do not need to write the code to move the files. The AJAXUploader will do that for you if you set FinalFileLocation property. You can find more information on how uploader works on this page:

http://doc.essentialobjects.com/library/1/ajaxuploader/ajaxuploader_behavior.aspx

Check Stage 3: moving files from TempFileLocation to FinalFileLocation.

The same topic also contains information and sample code about how to handle OnFileUploaded event if you do not want to use FinalFileLocation (for example, some people may want to store the entire file in database).

Temp folder does not contain actual file name because they are just temp files. You can get additional information about each uploaded file through the AJAXUploader's PostedFiles property, it returns a collection of AJAXPostedFile objects, each of them providing information for a single uploaded file, including their real name, temp file name, file size, etc:

http://doc.essentialobjects.com/library/1/eo.web.ajaxpostedfileproperties.aspx

Hope this helps.

Thanks!


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.