openlibhums / openlibhums/janeway

Long file names result in upload failure

Open
#3,105 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Priority medium Repositories Size M
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:

  1. When submitting a preprint, upload a PDF with a very long filename
  2. See error

Expected behavior
PDF would upload and be renamed to something more accessible (eg file ID)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.