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

Prevent pdfalto subprocess call failing due input filename #7

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

donaldgray
Copy link
Member

Spaces + ampersands in PDF source url were seen to cause issues. PDF saved with safe name and source saved in txt file alongside for troubleshooting.

Resulting output will now be:

/works/{work-folder}/download.pdf
/works/{work-folder}/details.txt

details.txt isn't necessary and only added to aid debugging/troubleshooting as work-folder is randomly generated.

whereas previously it would be a single PDF, named using final part of URL

/works/{work-folder}/{last-part-of-url}

If the final path contained ' ' or & the subprocess call to /usr/bin/pdfalto would fail.

Unrelated to above fix but also bumped LocalStack image used for local testing.

Spaces + ampersand in url were seen to cause issues. PDF saved with safe
name and source saved in txt file alongside for troubleshooting
@donaldgray donaldgray merged commit cbf52ac into main Feb 2, 2024
1 check passed
@donaldgray donaldgray deleted the feature/handle_url_chars branch February 2, 2024 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant