file download and an index check
|Reported by:||Brett||Owned by:||Petr Škoda|
I'm attaching a patch containing the changes I made to the 0.11 version to get it to work for me. There are essentially three parts to the change, with #1 being the important part.
1 - Switch to req.send_file() to take care of sending the file. This provides the user with a regular download status as the content-length is sent in the header rather than doing chunked mode. It also raises RequestDone to stop further processing. In the current version, I was getting an additional HTML error response corrupting all the downloaded files as it was attached to the end of each file I downloaded.
2 - Fix an attribute exception when deleting a download where not all of the fields were set.
3 - The last part is moving the insert_data so that I was getting consistent reports when the user was required a fill out the form for every download. I honestly don't see what the different is :) but it seemed to help. Although, I was also dealing with a browser cache that could have been the problem.