Hi,
I need to use RadAsyncUpload to upload the files and then save the file into database in code-behind. Everything works fine except the "InputStream" throws a file not found exception. I looked at the folder where the files are uploaded. Originally, the file name contains a series of number then the actual file name. After post, the file got renamed back to the actual file name! That's why the UploadedFile.InputStream cannot find the file. If the file is renamed, the input stream should look for the file with the renamed file name.
I can go around this problem of course, but I think you guys should fix this issue. (I have the latest version of Telerik library.) By the way, I can't use the "OnFileUploaded" event because I need to create my own object first. Then, these files are the attachments of my object.
If you want to see some code:
.aspx:
<telerik:RadAsyncUpload runat="server" ID="rauAttachment" HideFileInput="true" MultipleFileSelection="Automatic" TargetFolder="~/UserFiles/Temp/" Localization-Select="Attach Files" Width="88" OnClientValidationFailed="RauValidationFailed" />
.aspx.cs: Submit button click event:
Stream stm = rauAttachment.UploadedFiles[0].InputStream; //File not found exception occurs.
Regards,
Roger
I need to use RadAsyncUpload to upload the files and then save the file into database in code-behind. Everything works fine except the "InputStream" throws a file not found exception. I looked at the folder where the files are uploaded. Originally, the file name contains a series of number then the actual file name. After post, the file got renamed back to the actual file name! That's why the UploadedFile.InputStream cannot find the file. If the file is renamed, the input stream should look for the file with the renamed file name.
I can go around this problem of course, but I think you guys should fix this issue. (I have the latest version of Telerik library.) By the way, I can't use the "OnFileUploaded" event because I need to create my own object first. Then, these files are the attachments of my object.
If you want to see some code:
.aspx:
<telerik:RadAsyncUpload runat="server" ID="rauAttachment" HideFileInput="true" MultipleFileSelection="Automatic" TargetFolder="~/UserFiles/Temp/" Localization-Select="Attach Files" Width="88" OnClientValidationFailed="RauValidationFailed" />
.aspx.cs: Submit button click event:
Stream stm = rauAttachment.UploadedFiles[0].InputStream; //File not found exception occurs.
Regards,
Roger