How does the RadAsyncUpload differentiate between web users?

1 Answer 110 Views
AsyncUpload
Jeff
Top achievements
Rank 2
Iron
Iron
Veteran
Jeff asked on 24 Aug 2021, 07:40 PM

When a file is added to the UploadFiles collection, it goes to the RadUploadTemp folder, and given a filename prefix consisting of numbers.

When it comes time to actually upload those files to the desired location, and considering there is one Temp location for all users, how does this tool differentiate, and only upload the items pertaining to that user/session, etc.?

I've monitored the temp folder while dropping files into the dropzone, from two different computers, and I don't understand how it knows which files go with which browser session.

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter Milchev
Telerik team
answered on 27 Aug 2021, 12:05 PM

Hello Jeff,

Each uploaded file in the temporary folder has a unique name, regardless of the user that uploads it. The file is uploaded via a handler and this handler encrypts the exact name of the temporary folder and returns it as metadata to the client.

Then, upon postback, this metadata is sent to the server, where it is decrypted and the correct temporary file is accessed.

On the other hand, saving to the target folder needs to be handled manually if you need each user to have a separate folder. For example, you can set a different TargetFolder property for each user and the files will be uploaded automatically in the respective folder.

Another option is to use the FileUploaded server event and save manually the file in a custom directory with a custom name.

Regards,
Peter Milchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Jeff
Top achievements
Rank 2
Iron
Iron
Veteran
commented on 27 Aug 2021, 03:23 PM

Peter,

Thanks for the detailed response, and resource links.  Very helpful.

 

Jeff.

Tags
AsyncUpload
Asked by
Jeff
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Peter Milchev
Telerik team
Share this question
or