openlibhums / openlibhums/janeway
Long file names result in upload failure
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 238
- Forks
- 97
- Avg merge
- 9d 1h
- Merged PRs (30d)
- 8
Description
Describe the bug
During a preprint submission, uploading a file with a 130 character name results in an error:
Storage can not find an available filename for "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_xxxxxxx._xxxx_xxxx-xxxxx-xxxxxxxxx-xxxxxxxx-xxx-xxx-xxxxxxxxxxx-xx-xxx-xxxx-xxxxxx_xxxxxx". Please make sure that the corresponding file field allows sufficient "max_length".
Original filename:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_xxxxxxx._xxxx_xxxx-xxxxx-xxxxxxxxx-xxxxxxxx-xxx-xxx-xxxxxxxxxxx-xx-xxx-xxxx-xxxxxx_xxxxxx.pdf
Janeway version
1.4.2.1
To Reproduce
Steps to reproduce the behavior:
- When submitting a preprint, upload a PDF with a very long filename
- See error
Expected behavior
PDF would upload and be renamed to something more accessible (eg file ID)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the preprint submission by uploading a PDF with the reported long filename, then trace the storage error to the relevant upload handling. Done means the PDF uploads successfully and is renamed to an accessible identifier such as its file ID.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100