xlsx file corrupted during downloading from server
Folks, here is the situa开发者_运维知识库tion:
confirmed that the xlsx file is good on the disc. I copied the file from server and can open without problems.
using FileInputStream and BufferedInputStream to handle the client side download function. The download function i mean user can download the file by clicking a hyperlink, and a servelet call was made to the java class which uses FileInputStream and BufferedInputStream
Mime type was set correctly as application/vnd.openxmlformats-officedocument.spreadsheetml.shee
After download the file successfully, it will give a "converted failed" error while trying to use office 2003 to open this xlsx file.
any thoughts?
Thanks!
There are bytes which didn't belong in the HTTP response body or were simply missing there.
It's impossible to point out the actual root cause based on the information given as far. You have to check if the right bytes were written from local disk file system to the HTTP response body.
精彩评论