Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
rc  
#1 Posted : Monday, September 13, 2010 1:20:42 AM(UTC)
rc

Rank: Newbie

Groups: Member
Joined: 9/13/2010(UTC)
Posts: 2

Hello,

I would like to be able to prevent users from overwriting a file on the destination folder but I do not understand how to alter the code-behind to achieve this. I think that the ImageUploader1_FileUploaded class, called by the OnFileUploaded property, is a good candidate as a function that could contain the duplicate file checking code. After reading the documentation, I think that the fileOverwrite property in the Nirvanix class would do the job, but I am not sure how to implement this function to perform the check. Any help on this issue would be very much appreciated, I have included a copy of the function that I have been working on.

Ross

protected void ImageUploader1_FileUploaded(object sender, Aurigma.ImageUploader.FileUploadEventArgs e)
{
string catalogPath = "C:/Documents and SettingsDesktop/Test_folder/";
Aurigma.ImageUploader.SourceFileInfo sourceFile = e.SourceFile;
//sourceFile.Save(Server.MapPath(catalogPath) + sourceFile.FileName);

Aurigma.ImageUploader.Nirvanix.NirvanixExtender ;

sourceFile.Save(catalogPath + sourceFile.FileName);
}

Edited by user Monday, September 13, 2010 1:29:20 AM(UTC)  | Reason: Not specified

Dmitry.Obukhov  
#2 Posted : Monday, September 13, 2010 7:01:19 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Administration
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Ross,

Thanks for contacting us.

As far as I understand, you want prevent uploading duplicate files. I created simple application using Image Uploader. It allows uploading images, but if there is duplicate image (with the same name as image, which is located on the server) it will not be saved. I attached this sample for your reference. Please download and try it out.
If you have any additional questions, please feel free to let me know.
File Attachment(s):
IUSample.zip (2,353kb) downloaded 257 time(s).
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
rc  
#3 Posted : Tuesday, September 14, 2010 7:57:29 PM(UTC)
rc

Rank: Newbie

Groups: Member
Joined: 9/13/2010(UTC)
Posts: 2

Thank you very much for the help Dmitry - that solved the problem right away!
Users browsing this topic
Forum Jump  
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.