this.FormChunkTag returns null

2 posts, 0 answers
  1. Mihidum Jayasinghe
    Mihidum Jayasinghe avatar
    1 posts
    Member since:
    Jun 2012

    Posted 17 Nov 2009 Link to this post

    Hi,

    I'm writing a custom HTTPHandler to automatically rename a file that's being uploaded.
    I've refered to the following sample
    http://www.telerik.com/support/kb/silverlight/upload/uploadhandler-uniquefilename.aspx

    As in the sample I've add relevant code to set the ResultChunkTag. But the issue is
    when the second request comes to the handler this.FormChunkTag returns empty.

    Any thoughts on this?

     public override void ProcessStream() 
    6     { 
    7         // Check whether this is the first time ProcessStream is invoked. 
    8         // If this is the case, create the new file name by giving it a time stamp 
    9         // The next time ProcessStream gets invoked, we will use the name that is set 
    10         // the first time we enter ProcessStream 
    11         if (this.IsNewFileRequest()) 
    12         { 
    13             this.ResultChunkTag = string.Format(" [{0:yyyymmdd.hhmmss}]", DateTime.Now); 
    14         } 
    15         else if (this.FormChunkTag != null
    16         { 
    17             this.ResultChunkTag = this.FormChunkTag; 
    18         } 
    19          
    20         base.ProcessStream(); 
    21     } 

    Regards,
    MJ
  2. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 20 Nov 2009 Link to this post

    Hi Mihidum,

    Thank you for contacting us.

    Attached you can find an example where the Chunk-Tag technique is demonstrated. Please preview it and let us know how it works at your side.

    Kind regards,
    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