Welcome Guest Search | Active Topics | Sign In | Register

FileExplorer Options
Stewart
Posted: Wednesday, July 1, 2009 3:20:22 AM
Rank: Newbie
Groups: Member

Joined: 6/29/2009
Posts: 7
How you programatically change the TempFileLocation ?

I can see how to do this in the HTML source by editing this section....

<eo:AJAXUploader ID="FileUploader" runat="server"
AllowedExtension="" AutoUpload="True"
ClientSideOnCancel="upload_done" ClientSideOnDone="upload_done"
ClientSideOnStart="upload_begin" HideDisabledToolBarButton="True"
TempFileLocation="c:\temp\" Width="320px">


However in visual studio it does not know about FileUploader so I couldn't do

FileUploader.TempFilePath =


Thanks

Stewart
eo_support
Posted: Wednesday, July 1, 2009 7:57:53 AM
Rank: Administration
Groups: Administration

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

You should not change the AJAXUploader's TempFileLocation property programatically. That folder is used to store temp files and if you changes it, old temp files will not be correctly deleted. As a result, you will have more and more temp files on your system that never get deleted.

If you wish to move the file after user has uploaded, you can handle the FileExplorer's FileUploaded event. Inside that event you can move the newly uploaded files to wherever you want.

Thanks!
Stewart
Posted: Wednesday, July 1, 2009 8:03:12 AM
Rank: Newbie
Groups: Member

Joined: 6/29/2009
Posts: 7
But how do you set at the TempFileLocation. I've tried

controlid.TempFileLocation

but I can't work out what to use for the controlid

Thanks

Stewart
eo_support
Posted: Wednesday, July 1, 2009 8:56:10 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
We have already warned you not to do that. But if you insist, here is the code:

Code: C#
EO.Web.AJAXUploader uploader = 
    (EO.Web.AJAXUploader)FileExplorer1.FindControl("AJAXUploader");
uploader.TempFileLocation = whatever;


Here "AJAXUploader" is the ID of your AJAXUploader control. You can not use controlId.TempFileLocation because it is not a direct child of your page. It's a child control of the FileExplorer.

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.