Problem with RadUpload and Files smaller than buffersize

2 posts, 0 answers
  1. Oscar
    Oscar avatar
    1 posts
    Member since:
    Mar 2009

    Posted 27 Jun 2011 Link to this post

    Dear Telerik Team,

    I;ve consistently reproduced an issue where multiple files ( each smaller than the buffersize) fail to fire/set  the isFinalFileRequest properly except for the last file. I am using RadUpload and a httphandler as shown in part below. I've checked and the Me.IsFinalFileRequest is only true for the last file.

    I am using the httphandler .ashx as below.

     Public Class UploadHandler
            Inherits Telerik.Windows.RadUploadHandler
            Public Overrides Sub ProcessStream()
                    Dim _IsFinalFileRequest As Boolean = Me.IsFinalFileRequest
                    If _IsFinalFileRequest Then

    .. etc

    it works fine as soon as my files are bigger than buffersize ( default 100,000)

    Please advise on how to proceed.

    btw I am using
    2011.1.315.35 - Telerik.Windows.RadUploadHandler
    2011.1.315.1040 - Telerik.Windows.Controls and Telerik.Windows.Controls.Input

  2. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 29 Jun 2011 Link to this post

    Hi Oscar,

    You have to use the SaveChunkData method instead of ProcessStream like so:

    publicoverrideboolSaveChunkData(stringfilePath, longposition, byte[] buffer, intcontentLength, outintsavedBytes)
        boolsuccess = base.SaveChunkData(filePath, position, buffer, contentLength, outsavedBytes);

    PublicOverridesFunctionSaveChunkData(filePath AsString, position AsLong, buffer AsByte(), contentLength AsInteger, ByRefsavedBytes AsInteger) AsBoolean
        Dimsuccess AsBoolean= MyBase.SaveChunkData(filePath, position, buffer, contentLength, savedBytes)
        IfMe.IsFinalFileRequest() Then

    Please let us know if this helps you.
    Best wishes,
    Petar Mladenov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top