Anyone has a solution for keeping download statistics (start datetime, end datetime, etc.)?
More or less I already have something for storing statistics, the problems start when you start using download manager as it starts messing everything up. So if anyone has a solution for that, I’ll be grateful.
The solution is to let the download link redirect through an action to the real download so that you can increase the counter and let the user download it how he/she wants.
I’m already using an action for download, and it works if you’re using a native browser download, however download managers make a bunch of call to the action and this corrupts the statistics. I was able to slash it from 4 or more db rows to 2, however this is still not acceptable. But I have a few more ideas so hopefully I will be able to slash it to 1 unique db row.
I took a different approach and solved more or less solved this issue. My problem was that I was trying to save statistics right away (saving all info, and then download finished updating finished_on). I’m moved saving after full file was completed and that more or less fixed the problem. There might be a few seconds off for time interval then using download managers, but it’s still better than a bunch of corrupted records.