This is a migrated thread and some comments may be shown as answers.
Duplicate File Uploads
10 Answers 146 Views
This is a migrated thread and some comments may be shown as answers.
David S
Top achievements
Rank 1
David S asked on 21 Jul 2008, 05:08 PM
Hello,

I was wondering if it is possible to prevent duplicate uploads of files before they are loaded on the server?

Thanks,
David

10 Answers, 1 is accepted

Sort by
0
Erjan Gavalji
Telerik team
answered on 22 Jul 2008, 08:32 AM
Hi David,

Yes, this is possible. There are two approaches that come to my mind:
  • Sending the information about the available files on the server to the browser and later checking if the newly selected file exists in the available-files-array. This can have a security impact and can also drastically increase the page load;
  • Make Ajax calls to a webservice when a file is selected. The webservice will check if a file with a specified name exists on the server and will get the result.
Kind regards,
Erjan Gavalji
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
David S
Top achievements
Rank 1
answered on 22 Jul 2008, 01:15 PM
Hi Erjan,

Thank you for the quick reply.  But I think I may have worded my question incorrectly.  Is there any way at the presentation level to prevent duplicate files from being selected? 

E.g. User wishes to upload two files: selects 'test1.pdf' first, and then selects 'test1.pdf' a second time accidentally.  The system should not allow 'test1.pdf' to be selected twice before the files are uploaded on the server.

Hope this clarifies my question.

Thanks,
David
0
Accepted
Veselin Vasilev
Telerik team
answered on 22 Jul 2008, 02:06 PM
Hi David Subryan,

Here is one possible solution:

<telerik:radupload id="RadUpload1"    
    runat="server"    
    initialfileinputscount="2"   
 />   
 <asp:button runat="server" text="Submit" />   
 <asp:customvalidator id="Customvalidator1" runat="server" display="Dynamic"    
    clientvalidationfunction="validateRadUpload1"><span style="FONT-SIZE: 11px;">Invalid extensions.</span>   
 </asp:customvalidator>  

<script type="text/javascript">   
function validateRadUpload1(source, arguments)   
{   
var upload = $find('<%= RadUpload1.ClientID %>');   
var inputs = upload.getFileInputs();   
arguments.IsValid = inputs[0].value != inputs[1].value;   
}   
</script>   
 

I hope this helps.

Regards,
Veskoni
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
David S
Top achievements
Rank 1
answered on 22 Jul 2008, 03:37 PM
Hi Veskoni,

Thank you.  Your solution works great! 

Thanks,
David
0
Rose Mcmarry
Top achievements
Rank 1
answered on 24 Oct 2009, 06:59 PM
May be it is necessary to try working with some other programs? I had such a problem, too. I was recommended Clone Remover to solve this problem. I used it delete duplicate files duplicate music finder (http://www.fileutilityblog.com/archives/228). And now I solved my propgram. May be it will help you.      
0
Uberto Greco
Top achievements
Rank 1
answered on 12 May 2010, 02:33 PM
may be this Duplicate File Finder application will help you...

0
neel
Top achievements
Rank 1
answered on 08 Jul 2010, 01:23 PM
// I was wondering if it is possible to prevent duplicate uploads of files before they are loaded on the server?


yeah absolutely it is possible , you need to just remove the duplicates before uploading.
May be this can be useful to you :)
TRY a tool advanced system optimizer , use its duplicate file remover to remove all the duplicates .,
 It really works , check it out from http://download.cnet.com/Advanced-System-Optimizer/3000-2094_4-10147659.html?tag=mncol 

 Select the location where you want to search the duplicate files and remove by them ..

 It wll work ,
 thanks ...
0
shruthi
Top achievements
Rank 1
answered on 24 Jan 2011, 11:23 AM
I get this error at line :var inputs=upload.getFileInputs();

Object doesn't support this property or method

Any solution??
plz help
0
Larson
Top achievements
Rank 1
answered on 13 Oct 2015, 01:37 PM
try "Duplicate Files Deleter program" it must give you better result
0
frederiko
Top achievements
Rank 1
answered on 08 Jan 2016, 01:31 PM
DuplicateFilesDeleter is a simple, but effective tool to locate duplicate files in one or more selected search paths. It scans the files and compares them based on Byte for Byte Comparison, which ensures 100% accuracy. You can then choose to delete the selected duplicate or original files. The program is multi-threaded and performs scans quickly.
Asked by
David S
Top achievements
Rank 1
Answers by
Erjan Gavalji
Telerik team
David S
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Rose Mcmarry
Top achievements
Rank 1
Uberto Greco
Top achievements
Rank 1
neel
Top achievements
Rank 1
shruthi
Top achievements
Rank 1
Larson
Top achievements
Rank 1
frederiko
Top achievements
Rank 1
Share this question
or