|
Rank: Newbie Groups: Member
Joined: 5/23/2008 Posts: 8
|
Hi, I have downloaded the EO.Web controls and I am trying the Ajax upload control. I have set the TempFileLocation="~/TmpUpload" and FinalFileLocation="~/Img". After the upload is finished I checked the folder Img where the file should be but I didn’t find id. In the TmpUpload I found the file 3 files data ,info and status. My question is why the file it not was transferred from the TempFileLocation to the FinalFileLocation. Another question is, how I can check the file type at client side, before starting the upload, because for example I want to upload only image files. Thank you for your help
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The files are not transferred to FinalFileLocation until you submit the page. Consider the following sequence:
1. User uploads file A; 2. You will see a few files in TempFileLocation; 3. User deletes the file that he just uploaded; 4. You will see temp files in TempFileLocation got deleted (it's normal that sometimes they are not deleted, in which case they will be deleted at a later time); 5. User uploads another file B; 6. User submits the page (for example, by clicking another button); 7. Now you will see files B in FileFileLocation;
As you can see, user can change their files before submitting the page. Until then all the files are in TempFileLocation, not FinalFileLocation.
As for file types, you would need to set the uploader's AllowedExtension property.
Please feel free to let us know if you have any more questions.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 5/23/2008 Posts: 8
|
Hi, Thank you for your answer, is great the way in which you designed the Upload controller. Now I have another question; since I know where the file is after it finished to upload (in my Temp folder) how I can know the temporary file name and the extension of the file, at the client side, after the upload is finished. I am asking this because I want to make a preview image, for example I have a html Image control, I uploaded a picture, and the control will show me that picture, if I like it I am kipping the file and I will do the post-back if not I will delete it. During the development time I have dynamic IP, so my provider change from time to time the IP. I want to develop aspx application and I want to my friends to tested During the development process the host server has an dynamic IP. After the development and test period I will move the application to a production server which will have an fix IP Could you advice me what is the best license for my situation Thank you
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
There is no way for you to access the temp files before the page is posted back, even after the file has already been transferred to the server side. The most important reason for this is because the uploader automatically deletes the files in temp directory. So if you write any code that relies on the temp files, you may run into problems where we give you the temp file name, but by the time you go access it, the files no long exist.
What you can do is to have the uploader to automatically post back for you. You will need to set the uploader's AutoPostBack to true. This way the uploader automatically posts back the page and raises FileUploaded event for you every time the file finishes upload. You can then get details about the uploaded file from the uploader's PostedFiles property and decide what to do with it (for example, display a list of thumbnails). You will also handle the delete by yourself when you use it this way.
Changing IP address won't be a problem. All purchases are now developer license. There are currently no restriction on the number of IPs you can use.
Thanks
|
|