Skip to content

bug: Filenames with # (hash/number sign/pound sign) and ? (question mark) not supported #981

@ptamarit

Description

@ptamarit

Uploading a file with a # in its filename fails, and deleting the file does not work.
It is related to: #982 (Files: broken URL for files with slash)

Steps to reproduce the problem

  1. Create the file: $ echo 'test' > prefix#suffix.txt
  2. Create a new draft in Zenodo
  3. Upload the file
  4. The uploaded file appears as failed in the UI and the 3rd network request fails because it only includes the part of the filename before the # character:
    upload UI and network request failing
  5. Without reloading the page, clicking on the delete icon spins forever without any network request.
  6. Reloading the page, the file appears as "Pending"
  7. Clicking on the delete icon removes the file from the UI, but the network request fails because it only includes the part of the filename before the # character:
    delete network request failing

Solution

Since the filename is part of the URL (as opposed to the payload), the # character has a special meaning and should be escaped.
Tested for a support case by percent-encoding the filename, and therefore replacing # and %23 and it fixed the problem.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions