After uploading so many files using AjaxFileUpload , I noticed all files uploaded to the server are corrupted. The error message I get is "Excel can not open the file عربي.xlsx because the fileformat or the file extention is not valid".
If I change the file name from (عربي.xlsx) to (arabic.xlsx) and reupload the file then the file works!
more strange than that is when I tried to upload empty text file with arabic name and when I opened the file , the file opened correctly , but I found letter "n" in the content of the file which I didn't add in the first place !
Can someone explain how I can resolve this issue ? Thank you
None
0 Points
6 Posts
AjaxFileUpload corrupt files if the file name contains Arabic text !
Apr 17, 2014 07:23 AM|bomayed|LINK
After uploading so many files using AjaxFileUpload , I noticed all files uploaded to the server are corrupted. The error message I get is "Excel can not open the file عربي.xlsx because the fileformat or the file extention is not valid".
If I change the file name from (عربي.xlsx) to (arabic.xlsx) and reupload the file then the file works!
more strange than that is when I tried to upload empty text file with arabic name and when I opened the file , the file opened correctly , but I found letter "n" in the content of the file which I didn't add in the first place !
Can someone explain how I can resolve this issue ? Thank you
None
0 Points
6 Posts
Re: AjaxFileUpload corrupt files if the file name contains Arabic text !
Apr 19, 2014 11:03 AM|bomayed|LINK
Can someone please help me resolve this issue ?
Member
16 Points
21 Posts
Re: AjaxFileUpload corrupt files if the file name contains Arabic text !
Apr 19, 2014 04:16 PM|planetpress|LINK
Bomayed,
Not sure but you might like to change the culture info of your page hosting file upload.
http://asp.net-tutorials.com/localization/changing-the-active-culture/
See if this works
None
0 Points
6 Posts
Re: AjaxFileUpload corrupt files if the file name contains Arabic text !
Apr 20, 2014 01:51 AM|bomayed|LINK
I changed the culture , still not working.
All-Star
30411 Points
3628 Posts
Re: AjaxFileUpload corrupt files if the file name contains Arabic text !
Apr 20, 2014 09:56 PM|Fuxiang Zhang - MSFT|LINK
Hi bomayed,
Thank you post the issue to asp.net forum.
Just for a diagnosis, please try to upload the excel file with the عربي.xlsx name, then try to change the file name as arabic.xlsx in the
AjaxFileUpload1_UploadComplete method like below.
Then see if it ok. If not please see below similar thread AjaxFileUpload file name cannot contains special chars, and vote it.
http://ajaxcontroltoolkit.codeplex.com/workitem/27655
Thanks.
Best Regards!