Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF files damaged #74

Open
julkah opened this issue Oct 5, 2021 · 6 comments
Open

PDF files damaged #74

julkah opened this issue Oct 5, 2021 · 6 comments

Comments

@julkah
Copy link

julkah commented Oct 5, 2021

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

@Romern
Copy link
Owner

Romern commented Oct 5, 2021

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

@septatrix
Copy link
Collaborator

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.

Repository owner deleted a comment from julkah Oct 17, 2021
@septatrix
Copy link
Collaborator

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

@septatrix
Copy link
Collaborator

url = url.replace("?forcedownload=1","").replace("mod_page/content/3","mod_page/content")

@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 added a commit that referenced this issue Nov 9, 2021
@n0toose
Copy link
Collaborator

n0toose commented Oct 24, 2022

Has this issue been resolved?

@septatrix
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants