-
Notifications
You must be signed in to change notification settings - Fork 359
Add document file name to API #108
Comments
The endpoints for previews and downloads correctly report filenames and content type as part of the response ( I can add these again, However: Paperless generates PDF documents with embedded text from images and stores both the original image and the PDF document in its media folder. The API prefers to serve the PDF over the original, if available. There's an option that forces paperless to serve originals, which I need to document. The response headers always reflect what's being served. Some background: I really wanted paperless to be able to add selectable text to image-only documents (both pdf documents without text and pure images), and since I didn't really feel comfortable with overwriting the original documents, I've decided to keep both. This solution also allows users to retroactively add text layers to image-only documents, and keep track of which documents this has already been done for. Also: No issues when the pdf libraries decide to fail. Also: No issues when users want to move away from paperless, original documents still there. If I were to add filenames again, each document would have both an I really need to get this documented. |
I guess I could implement that by parsing the Content-Disposition header but that would mean I either had to
I guess solution number 2 is okay but I would prefer your proposal of including |
Well, that's done. I'm sorry for making this somewhat more complicated, however, these changes were required for the new OCR mechanisms. |
Thanks! No worries, this seems to be straight-forward 😊 |
Missing required editing of `src-ui/src/app/app.module.ts`
I have found one change in the API that I perceive as a regression. The old API used to contain a
file_name
attribute for documents. This is gone now. I have used the file ending to choose which viewer to use (PNG files don't work in Adobe Reader for example).This means that currently only PDF documents can be viewed in Paperless App, if Paperless-NG is the backend.
The text was updated successfully, but these errors were encountered: