This is a migrated thread and some comments may be shown as answers.

Upload file exists, automatically rename and save

1 Answer 139 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
michelle
Top achievements
Rank 1
michelle asked on 27 Oct 2010, 11:36 PM
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.

Thanks!
Michelle

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 02 Nov 2010, 10:17 AM
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.

Regards,
Fiko
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
Tags
FileExplorer
Asked by
michelle
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or