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

Upload Excel file directly from the disk without creating a copy of the file in target folder

1 Answer 61 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Karthik
Top achievements
Rank 1
Karthik asked on 11 Sep 2013, 07:44 PM
Hello,

I am using RadUpload to upload the excel sheet records to the database... after upload is completed a file is saved to the Target folder, I am wondering is their any way to upload the file directly from the disk and not create any file in the Target folder, cause when deployed to production it is creating the copied in the server, which is causing some write security issues. and more over we don't need a copy of the file, as the data is stored to the database.

can anyone please suggest me something.. I would really appreciate your help..

Thank you very much
Karthik

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 11 Sep 2013, 10:11 PM
Hi Karthik,

In order to modify the RadUpload implementation not to save the files on the server, you will have to modify the UploadHandler SaveChinkData method. Basically as log as you don't invoke the  base.SaveChunkData(filePath, position, buffer, contentLength, out savedBytes);  method, the default uploading logic will not run.

This means that instead you will have to manually gather the uploaded bytes and once the last chunk is sent to the server, add the array in the database. Such an approach is demonstrated in this forum thread - please look for the UploadDirectlyIntoDataBase-Updated solution. You can give it a try and see of it works for you.

Regards,
Tina Stancheva
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Upload
Asked by
Karthik
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or