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?
Regards,
MJ
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() | |
{ | |
// Check whether this is the first time ProcessStream is invoked. | |
// If this is the case, create the new file name by giving it a time stamp | |
// The next time ProcessStream gets invoked, we will use the name that is set | |
// the first time we enter ProcessStream | |
if (this.IsNewFileRequest()) | |
{ | |
this.ResultChunkTag = string.Format(" [{0:yyyymmdd.hhmmss}]", DateTime.Now); | |
} | |
else if (this.FormChunkTag != null) | |
{ | |
this.ResultChunkTag = this.FormChunkTag; | |
} | |
base.ProcessStream(); | |
} |
Regards,
MJ