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

2 posts, 0 answers
  1. Patrick
    Patrick avatar
    17 posts
    Member since:
    May 2009

    Posted 15 Jan 2010 Link to this post

    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?

  2. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 18 Jan 2010 Link to this post

    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.
  3. DevCraft banner
Back to Top