This middleware allows users to upload files using the HTTP PUT or PATCH method. Backports the functionality from django-ninja#719 which in turn is based on django-ninja#417 (comment) which should be available in django-ninja
if django-ninja#397 is merged ( in that case this middleware works as a backport )
- Django 3.2+
- Asgiref 3.6.0+
- Python 3.9+
- Install the package using pip :
pip install ninja_put_patch_file_upload_middleware
- Add the middleware to your middleware stack:
# settings.py
MIDDLEWARE = [
...
"ninja_put_patch_file_upload_middleware.middlewares.process_put_patch",
]
This package is licensed under the MIT License ( same as django-ninja
). See the LICENSE file for more information.
I am not willing to add any more functionality to this module. This should work as is. Unless there are changes in django
/asgiref
side. Please dont ask for changes >_<