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

Is the ProcessStream() method called for every file uploaded?

1 Answer 53 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 15 Jan 2010, 08:04 PM

I am not quite sure how to deal with the uploaded files in the ProcessStream() method. Do I have to wait until all the files are uploaded then check this.IsFinalFileRequest() before I can save the files to the database? Or can I save a file to the file system and at the same time save its information into the database? I guess what I am trying to find out is, is the ProcessStream() method called for every file uploaded? So in the ProcessStream() I could first save the file to my file location and then add a record to the database, would that work? Do you have an example like that flooding around?

1 Answer, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 18 Jan 2010, 07:25 AM
Hi Patrick,
 
Thank you for contacting us.
 
Each file is uploaded in a chain of chunks.Default chunk size is 100'000 bytes. You can change this size initializing the BufferSize property. Inside the ProcessStream method you can get access only to the uploaded chunk, i.e. you should tag the uploading file in order to save it correct. You can preview the RadUpload ChunkTag or how to deal with uploaded files by chunk article where chunk-tag process is discussed. Please note inside the ProcessStream method few parameters are prepared and returned to the upload control, because of this if you rip it completely, you should return these parameters too.
 
Please try the example attached to the mentioned above article and let us know if you have other questions.


Greetings,
Ivan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Upload
Asked by
Patrick
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Share this question
or