Duplicate File Uploads

Thread is closed for posting
11 posts, 1 answers
  1. David S
    David S avatar
    11 posts
    Member since:
    May 2008

    Posted 21 Jul 2008 Link to this post

    Hello,

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

    Thanks,
    David
  2. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 22 Jul 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. David S
    David S avatar
    11 posts
    Member since:
    May 2008

    Posted 22 Jul 2008 Link to this post

    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
  5. Answer
    Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 22 Jul 2008 Link to this post

    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
  6. David S
    David S avatar
    11 posts
    Member since:
    May 2008

    Posted 22 Jul 2008 Link to this post

    Hi Veskoni,

    Thank you.  Your solution works great! 

    Thanks,
    David
  7. Rose Mcmarry
    Rose Mcmarry avatar
    1 posts
    Member since:
    Jul 2009

    Posted 24 Oct 2009 Link to this post

    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.      
  8. Uberto Greco
    Uberto Greco avatar
    1 posts
    Member since:
    May 2010

    Posted 12 May 2010 Link to this post

    may be this Duplicate File Finder application will help you...

  9. neel
    neel avatar
    1 posts
    Member since:
    Jul 2010

    Posted 08 Jul 2010 Link to this post

    // 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 ...
  10. shruthi
    shruthi avatar
    6 posts
    Member since:
    Jan 2011

    Posted 24 Jan 2011 Link to this post

    I get this error at line :var inputs=upload.getFileInputs();

    Object doesn't support this property or method

    Any solution??
    plz help
  11. Larson
    Larson avatar
    1 posts
    Member since:
    Oct 2015

    Posted 13 Oct 2015 Link to this post

    try "Duplicate Files Deleter program" it must give you better result
  12. frederiko
    frederiko avatar
    1 posts
    Member since:
    Jan 2016

    Posted 08 Jan Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017