6 Answers, 1 is accepted
0
Hi Scott,
Thank you for interest in the Radupload control.
Please preview the Saving files with unique name on the server using RadUploadHandler article. There are an example and the explanation you are looking for.
We hope this information will help you. Of course if you have more question do not hesitate to contact us.
All the best,
Ivan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Thank you for interest in the Radupload control.
Please preview the Saving files with unique name on the server using RadUploadHandler article. There are an example and the explanation you are looking for.
We hope this information will help you. Of course if you have more question do not hesitate to contact us.
All the best,
Ivan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Scott
Top achievements
Rank 1
answered on 04 Aug 2009, 07:06 PM
Thanks for your reply. I read that article and can rename and save files just fine. My question is if the rename FAILS and I catch it, I want to rename again and re-upload. I can't figure out how to programmatically restart the upload when the RadUpload_FileUplaodFailed event is triggered.
0
Hello Scott,
Thank you for the clarification.
Actually there are two main approaches to rename uploaded files
Please note the RadUpload can not re-upload files neither after successful upload nor after failed one. This is the reason we have advised you already to use the Saving files with unique name on the server using RadUploadHandler approach.
Let us know if we can assist you further.
Regards,
Ivan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Thank you for the clarification.
Actually there are two main approaches to rename uploaded files
- Client side.
This is the easiest way and it was already described in the How to upload a file with a different name article.
Pros: The upload handler was not modified - actually you can use any existent handler to receive the uploaded file.
Cons: This not an appropriate technique for realizing an unique file name. - Server side.
File rename process is implemented in the upload handler and the client code my not participate.
Pros: This is the better way to get an unique file name. Actually you can try as many different names as you want.
Cons: The upload handler is a specialized one.
Here you have two different ways:- Rename at the and of the upload process.
Not so sophisticated approach. Even more you can override an existing file or another uploader can override your file. Here you should override the ProcessStream method and inside it you should wait for the final upload chunk like in the code below:
public override void ProcessStream() { base.ProcessStream(); // Check if this is the last chunk if (this.IsFinalFileRequest()) { // here you can do your Custom Action } } - Rename at beginning of the upload process.
This is the best approach and it is described in the Saving files with unique name on the server using RadUploadHandler article. Actually you can use this technique to upload files in a temp folder and only after successful upload to publish them in the official folder.
- Rename at the and of the upload process.
Please note the RadUpload can not re-upload files neither after successful upload nor after failed one. This is the reason we have advised you already to use the Saving files with unique name on the server using RadUploadHandler approach.
Let us know if we can assist you further.
Regards,
Ivan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Files Renamer
Top achievements
Rank 1
answered on 30 Apr 2010, 09:28 PM
I really use that kind of information my works get more easier that before. I am currently File Renamer and now its going so easy.
0
Aravind
Top achievements
Rank 1
answered on 30 Nov 2012, 11:14 AM
0
jonathan
Top achievements
Rank 1
answered on 25 Sep 2017, 07:57 PM
This is a great article. You can
use this technique. Beside this- I have a software for bulk rename. My software
works with all platform. For checking my software go to google.com and type-
BatchRenameFiles Tool. Check the first result.