syncMyMoodle icon indicating copy to clipboard operation
syncMyMoodle copied to clipboard

PDF files damaged

Open julkah opened this issue 3 years ago • 6 comments

Some pdf files are damaged when downloaded via syncMyMoodle. Downloading the same file using moodle's web interface doesn't yield this damaged file.

julkah avatar Oct 05 '21 10:10 julkah

Damaged meaning the downloaded file contains the moodle error page "Die gesuchte Datei wurde nicht gefunden."

Romern avatar Oct 05 '21 11:10 Romern

Could you share such a damaged file? I also recently stumbled upon some of those however for me it seemed like the session timed out as the content was just the HTML content of the login page.

septatrix avatar Oct 15 '21 16:10 septatrix

This specific PDF file was reachable under a the url .../mod_page/content/3/foobar.pdf - which for some reason gets modified since ea17a29d741d5fca17f6175aeef5305bf4ce482e. The result is a wrong URL...

septatrix avatar Oct 18 '21 20:10 septatrix

https://github.com/Romern/syncMyMoodle/blob/4bcb51fb19cf041df56979fdbb9c0e84a6675add/syncmymoodle/main.py#L43

@julkah Do you mind removing this line as well as the local pdf and re-running smm to check if that fixes it? (The second replace is presumably at fault here though I also cannot think of a reason for the former.)

septatrix avatar Oct 18 '21 20:10 septatrix

Has this issue been resolved?

n0toose avatar Oct 24 '22 11:10 n0toose

Nope, only on v2 branch though it is untested there.

septatrix avatar Oct 24 '22 11:10 septatrix