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

File names containing quotes are not uploaded properly #235

Open
coderbot16 opened this issue Oct 27, 2022 · 1 comment
Open

File names containing quotes are not uploaded properly #235

coderbot16 opened this issue Oct 27, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@coderbot16
Copy link

I've started to use the consume-dir mode of dsc recently and I dumped a whole load of old documents in. This worked fairly well for the most part (though I had to restart dsc a few times throughout the process because it would time out when uploading a big file) but as I was cataloging the documents today I noticed a few of them were titled integration: No files supplied. When I looked at them, the only attachments were labeled as No name. This seemed very odd, and I had to spend some time going back through the original files I had backed up to figure out what their names used to be.

I started to fix the names and such, by manually reuploading the documents and deleting the broken ones, but a pattern emerged: the files that were broken were the ones that contained a pair of double quotes in their names, such as a file titled Essay on "The Jungle".pdf.

This also seemed to cause the full-text search of Docspell to silently fail with a 422 HTTP code when one of these broken files appears in the results. Since the files are totally missing an attachmentName field, Docspell fails to decode the response:

Caused by: DecodingFailure(Missing required field, List(DownField(attachmentName), DownArray, DownField(docs), DownField(response)))

I only stumbled on this since I tried to search for the content of the documents to see if I could find one with a similar name, but that did not work. Overall this isn't a big issue, but I assume it's a trivial fix as well.

Thanks for your time and making this nice tool!

@eikek
Copy link
Member

eikek commented Oct 28, 2022

Thank you very much for reporting! I need to dig into why dsc creates a bad request in these cases.

@eikek eikek added the bug Something isn't working label Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants