开发者

xlsx file corrupted during downloading from server

开发者 https://www.devze.com 2023-02-14 04:20 出处:网络
Folks, here is the situa开发者_运维知识库tion: confirmed that the xlsx file is good on the disc.

Folks, here is the situa开发者_运维知识库tion:

  1. confirmed that the xlsx file is good on the disc. I copied the file from server and can open without problems.

  2. 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

  3. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消