Welcome Guest Search | Active Topics | Sign In | Register

AJAX Uploader Options
Tom Chimento
Posted: Wednesday, August 5, 2009 11:54:55 AM
Rank: Newbie
Groups: Member

Joined: 8/4/2009
Posts: 2
How would I overwrite an existing file using the Ajax Uploader? If the file exists on the server it writes a new file name.
eo_support
Posted: Wednesday, August 5, 2009 12:02:57 PM
Rank: Administration
Groups: Administration

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

You would clear the uploader's FinalFileLocation and then handle the FileUploaded event. Inside the event you will get a temp file name. You are then free to move that file to wherever you would like or even overwrite an existing file with code.

Thanks!
Tom Chimento
Posted: Wednesday, August 5, 2009 1:11:33 PM
Rank: Newbie
Groups: Member

Joined: 8/4/2009
Posts: 2
Thanks for the quick reply. I have just tried what you recommended following the example code for PostedFiles.

When I try to move the file I get the error that the file already exists. When I try to copy w/ overwrite I get the error message " The file is in use by another process"

I must be missing something!

eo_support
Posted: Wednesday, August 5, 2009 1:25:21 PM
Rank: Administration
Groups: Administration

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

That is not something that we will be able to help with. You are locking the file somewhere else in your code. The uploader handle over you the temp file and the rest is all yours.

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.