[GH-ISSUE #321] API document upload broken #254

Closed
opened 2026-02-25 21:31:33 +03:00 by kerem · 4 comments
Owner

Originally created by @telsch on GitHub (Feb 28, 2021).
Original GitHub issue: https://github.com/ciur/papermerge/issues/321

Originally assigned to: @ciur on GitHub.

Description
Document can't be uploaded via API. Fetching document information works.

Expected
Upload a document via API inserts document in users inbox.

Actual
Got following error message.
{"detail": "Unsupported media type "" in the request."}

  • OS: docker
  • Browser Firefox
  • Database SQLite
  • Papermerge Version 2.0rc38
Originally created by @telsch on GitHub (Feb 28, 2021). Original GitHub issue: https://github.com/ciur/papermerge/issues/321 Originally assigned to: @ciur on GitHub. **Description** Document can't be uploaded via API. Fetching document information works. **Expected** Upload a document via API inserts document in users inbox. **Actual** Got following error message. {"detail": "Unsupported media type \"\" in the request."} - OS: docker - Browser Firefox - Database SQLite - Papermerge Version 2.0rc38
kerem 2026-02-25 21:31:33 +03:00
Author
Owner

@ciur commented on GitHub (Mar 1, 2021):

@telsch, thank you for reporting this. What document type did you upload ? pdf, jpeg, png or tiff ?

<!-- gh-comment-id:787873052 --> @ciur commented on GitHub (Mar 1, 2021): @telsch, thank you for reporting this. What document type did you upload ? pdf, jpeg, png or tiff ?
Author
Owner

@telsch commented on GitHub (Mar 1, 2021):

I have only tried to upload a PDF. Also set the content type to application/pdf failed.

<!-- gh-comment-id:788070153 --> @telsch commented on GitHub (Mar 1, 2021): I have only tried to upload a PDF. Also set the content type to application/pdf failed.
Author
Owner

@ciur commented on GitHub (Mar 1, 2021):

I just checked, indeed, for some reason, it always reports "unsupported media type".
Thank you for reporting this bug! Will be fixed.

<!-- gh-comment-id:788115947 --> @ciur commented on GitHub (Mar 1, 2021): I just checked, indeed, for some reason, it always reports "unsupported media type". Thank you for reporting this bug! Will be fixed.
Author
Owner

@Ryther commented on GitHub (Mar 1, 2021):

Hi,
tried with a .png with the same outcome.
I've updated my importer to manage errors a lot better (version 1.2.0 of the docker image)

<!-- gh-comment-id:788315617 --> @Ryther commented on GitHub (Mar 1, 2021): Hi, tried with a .png with the same outcome. I've updated my importer to manage errors a lot better (version 1.2.0 of the docker image)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/papermerge#254
No description provided.