-
Notifications
You must be signed in to change notification settings - Fork 40
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
Unsupported Media Type with Chunked Uploads #123
Comments
Okay, so after a lot of sleuthing, it looks like FilePond is setting the CONTENT_TYPE header to "application%2Foffset%2Boctet-stream" which looks like a URL encoded version of the expected "application/offset+octet-stream". Here's my Filepond (v4.31.3) config on the frontend:
A hacky bit of Django middleware placed near the top of the stack fixes the problem:
This may be a bug on the Filepond side of the fence, but figured I'd report here in case anyone else has this issue. |
Hi, thanks for highlighting this issue. I'll try to find some time to investigate this in the next couple of days. It sounds like something may possibly have changed on the Filepond client side - glad you managed to work around this with some middleware but it should certainly work without that and certainly did previously so it looks like maybe a fix is required here. |
Greetings! I'm excited about using this package to handle my integration with Filepond. Unfortunately, when setting up my client according to your documentation, my Django app returns this response:
method: PATCH
code: 415
message: Unsupported media type "application offset/octet stream"
You documentation mentions no further configuration necessary for supporting chunked uploads, but I can't seem to get it to work. I'm using:
django 4.2.7
djangorestframework 3.14.0
django-drf-filepond 0.5.0
In settings.py, I tried specifying "rest_framework.parsers.FileUploadParser" under 'DEFAULT_PARSER_CLASSES' for the REST_FRAMEWORK setting but no luck.
What am I missing? Many thanks in advance!
The text was updated successfully, but these errors were encountered: