Welcome Guest Search | Active Topics | Sign In | Register

Viewing Uploaded Files Options
Colin
Posted: Friday, February 15, 2008 3:05:16 AM
Rank: Advanced Member
Groups: Member

Joined: 2/1/2008
Posts: 35
I am just trialing the Ajax Uploader and have created a new aspx page with the uploader on it and set the temp folder for the files. In my local browser I have been able to upload a file to this folder but how do I now view or download the file to my desktop?

Regards.
eo_support
Posted: Friday, February 15, 2008 6:29:34 AM
Rank: Administration
Groups: Administration

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

The uploader only uploads the files for you. Once it is in the TempLocation, you will need to move it to it's desired final location (the TempLocation should be a folder for uploader to store temp files, not for you to store the final files). To do that you will want to handle the uploader's FileUploaded event and then move files in that event. We have a new build coming out that can automatically do this file moving for you.

Once the files are moved to a specific location, it will be just as any other files on your server. The easiest way for your user to download the file is to put a link there. For example, if you have a file called Test.zip that you want your user to download, you just put something like this in your page:

<a href="http://your_domain_name/test_app/files/Test.zip">Download Test.zip</a>

Thanks
Colin
Posted: Friday, February 15, 2008 7:08:41 AM
Rank: Advanced Member
Groups: Member

Joined: 2/1/2008
Posts: 35
Hi,

I have 253 users who will be required to upload various files at some point and about 10 users who will be the responsible party for reading the uploaded files. All users have access via roles etc. to the site but none have access to the design features. I would want to create various folders where the files were uploaded to that would enable the 10 users to then see the files or download them to their pc. Is this possible with your new version and when will it be available?

Regards,
Colin.
eo_support
Posted: Friday, February 15, 2008 7:21:35 AM
Rank: Administration
Groups: Administration

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

It is possible. All you need to do is to give the uploader the correct folder. The current version provides one property: TempLocation. The new version provides two properties: TempLocation and FinalLocation.

You should set TempLocation to a fixed location and never change it. However you can change FinalLocation based on whatever logic you would like to (for example, if you want to have files in different dates to be in different folder, you can do so). Remember all the uploader does it to accept a "FinalLocation" value and copies the file for you. You, not uploader, will be the one that generates the FinalLocation value. For example, if you want to store files in different date to be in different folder, you can format the FileLocation to use today's date in dd-mm-yyyy format, or you can use the number of days since January 1st, the first day use a folder "1", the second day uses a folder "2"...etc. That's totally up to you. The uploader will not do that for you.

You would need to do the same with the current version as well. So basically the only difference between the current version and the new version is the new version automatically copies the file for you. Either you copy the file by yourself (in the current version), or the uploader copies for you (in the new version), you always need to know where to copy first. And that will be the core of your application logics, not the uploader.

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.