|
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.
|
|
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!
|
|
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!
|
|
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!
|
|