ciur / papermerge

Open Source Document Management System for Digital Archives (Scanned Documents)
https://papermerge.com
Apache License 2.0
2.55k stars 267 forks source link

Files with "&" w/ filename will be ignored by GUI-Import #496

Closed olli0815 closed 1 year ago

olli0815 commented 1 year ago

In case you experience issues with docker image provided by linuxserver.io/papermerge, please open bug report in their repository.

Description If a filename contains any "&" the file won't be imported

Expected import or error message in GUI

Info:

ciur commented 1 year ago

What happens here is that backend returns an error with message:

{"errors":[{"detail":"Enter only safe characters.","status":"400","source":{"pointer":"/data/attributes/title"},"code":"invalid"}]}

Which is correct - as the backend is not allowed to upload files which contains "&". However, the frontend (i.e. GUI) does not show the error to user :(.

I see two problems here actually:

  1. It should be documented what are allowed files names (valid file names)
  2. The GUI should report the problem i.e. show why files was not uploaded
ciur commented 1 year ago

Following pull requests handles also the invalid characters set error messages i.e. when user uploads a document with title containing one of the invalid set characters - it will display an error message:

https://github.com/papermerge/papermerge.js/pull/35/files

ciur commented 1 year ago

invalid character set error message