Async Upload access file name on Post

3 posts, 0 answers
  1. Robert Madrian
    Robert Madrian avatar
    168 posts
    Member since:
    Apr 2003

    Posted 26 Dec 2015 Link to this post


    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



  2. Dimiter Madjarov
    Dimiter Madjarov avatar
    2213 posts

    Posted 04 Jan 2016 Link to this post

    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!

    Dimiter Madjarov
    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
  3. Robert Madrian
    Robert Madrian avatar
    168 posts
    Member since:
    Apr 2003

    Posted 05 Jan 2016 in reply to Dimiter Madjarov Link to this post

Back to Top