Tuesday, August 18, 2009

Dev : Download File With Semicolon

Created a spreadsheet, named as wifes_acc;children_acc.xls. Uploaded to an webapplication, and try to download it using IE7. WTF?! How come my spreadsheet became wifes_acc only after I click download. Where is there remaining name? How come the file was not found on the server?

Damn, what happened. Try with mozilla. Wow, it downloaded just fine. What happened?

We came across such problem when dealing with upload and download of attachment. After some finding on the Net, I realized that the actual problem lies with IE7. When ever user click the download button, we will execute "response.setHeader("xxxx")" on our coding to set the file name. In such, IE will always read the semicolon ";" in the header data as a delimiter for others parameters. Therefore, the name was actually splited into 2 parts.

Damn, an IE7 bug, hopefully such problem will be resolved in IE8.

No comments: