Upload file exists, automatically rename and save

2 posts, 0 answers
  1. michelle
    michelle avatar
    16 posts
    Member since:
    Jul 2008

    Posted 27 Oct 2010 Link to this post

    Required functionality, on upload from the file explorer upload dialog if the document being uploaded already exists(and overwrite files is not selected), automatically rename the document with a new version number, and upload it.  How do I cancel the validation that happens between the ItemCommand() and custom content provider method StoreFile()?  Currently, ItemCommand() method fires, I am not able to change the upload.filename (read only) in this method.  The validation then fires preventing the StoreFile() method, so I am not able to modify the filename in this method either.  I would really like to remove this automated validation, and add my own.

  2. Fiko
    Fiko avatar
    1406 posts

    Posted 02 Nov 2010 Link to this post

    Hello Michelle,

    The GetFile method in the FileBrowserContentProvider  is used in order to check whether a file exists or not. If that method return null (Nothing in VB.NET) this means that the file does not exist. Using RadFileExplorer, it is safe to override this method to always return null. In this case the StoreFile method will be called every time you upload a file.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top