Last post Apr 20, 2014 09:56 PM by Fuxiang Zhang - MSFT
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
Apr 19, 2014 11:03 AM|bomayed|LINK
Can someone please help me resolve this issue ?
Apr 19, 2014 04:16 PM|planetpress|LINK
Not sure but you might like to change the culture info of your page hosting file upload.
See if this works
Apr 20, 2014 01:51 AM|bomayed|LINK
I changed the culture , still not working.
Apr 20, 2014 09:56 PM|Fuxiang Zhang - MSFT|LINK
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.
protected void AjaxFileUpload1_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
var filename = "Arabic" + System.IO.Path.GetExtension(e.FileName);
AjaxFileUpload1.SaveAs(Server.MapPath("~/Files/") + filename);
Then see if it ok. If not please see below similar thread AjaxFileUpload file name cannot contains special chars, and vote it.