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

Async Upload access file name on Post

2 Answers 183 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Robert Madrian asked on 26 Dec 2015, 05:12 PM

Hello,

I'm new to the upload extension - I'm able to upload a file async in the App_Data folder but I have the following questions:

 1. how to access the filenames which I have uploaded async in the [HttpPost] ActionResult?
(sync is no problem because I have the HttpPostedFileBase Parameter)

 2. how to ensure that I have unique filenames?

3. I will save the files in my database after the HttpPost - might be a solution to save the the files in a Session variable or should I save them in the App_Data temporary

robert

 

2 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 04 Jan 2016, 08:22 AM

Hello Robert,

When the files are uploaded asynchronously, the file names could be accessed the same way i.e. as a list of HttpPostedFileBase. You could check the following demo for details.

If you would like to check if a file with the same name has already been selected, you could attach a handler to the select or upload event (depending on which user action you would like to prevent).

The last question is not specifically related to the Upload widget functionality. I would suggest to check for some solutions on stackoverflow.

I hope this information helps. Have a great day!

Regards,
Dimiter Madjarov
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
answered on 05 Jan 2016, 02:44 PM
Thank's
Tags
Upload
Asked by
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Answers by
Dimiter Madjarov
Telerik team
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Share this question
or