Not saying this is the same issue, I’ve been dealing with the same error on some downloads the last week.
We tested with and without our caching plugin.
Deleted Transients (multiple times)
Reset the Permalinks on the site
Last week, I noted that if I go and find the file and Update that Download Post, it worked again. Now, I’ve just found that going into the download and just hitting the Update button fixes the issue for us.
So, I looked through the post and postmeta records for all of the related 3 post records and 19 meta records. I did find one particularity. The value for _filesize was different. My guess is that our Image optimization plugin (Imagify) did it’s thing and reduced the size of several PDFs. So the value in the database, no longer was accurate.
Assuming this is sent as the content-length in the header to the browser, forced download breaks because it doesn’t match the data being streamed to the browser. I would think the same error would happen if you replaced the PDF with a newer version on S3, for example.
I think the preference would be to base the content-length on the actual filesize rather than the value in the database. There could be complications depending on the source of the file and I can see why this might be setup this way.
-
This reply was modified 4 years ago by
tenacityio.
Thread Starter
e.lito
(@elito-1)
Thank you @tenacityio, it’s interesting, i chekc and we do not have imagify installed on this website so not same issue.
But now iknow that imagify optimize PDFs 😀
Hello @tenacityio,
I’m sorry about this! It seems to be a bug and we are working on fixing it. We think it’s the issue as here: https://github.com/WPChill/download-monitor/issues/860
Warmly,
Beatrice.