How to fix "Failed to load resource" bug when submit form to download file?
I try to create some script to send a lot of required data to the server after that server will send a generated file back. I know, it's possible to create some link that contain my data like the following code for sending data to server and get the file back.
<a href="domain.com/getExcel.asp开发者_如何学Cx?id=ABC&title=Report1" target="_blank" />
But the maximum length of URL is around 2000 characters that I cannot guarantee the length of data will not over this limit. So I try to use "jQuery Plugin for Requesting Ajax-like File Downloads" to send data to the server by dynamic creating form with hidden input.
Everything works great on IE9. But I got "Failed to load resource" error message when I use it in Google Chrome 9. I think this problem occurs only when response header is set to Attachment.
Demo: http://fiddle.jshell.net/SP3Tx/3/show/
Source: http://jsfiddle.net/SP3Tx/3/
Do you have any walk-around to fix this bug?
Update
I just submit this bug to chromium issue tracker.
http://code.google.com/p/chromium/issues/detail?id=75384
精彩评论