Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/baseplate-admin/ninja_put_patch_file_upload_middleware
A middleware that allows user to upload files using PUT / Patch
https://github.com/baseplate-admin/ninja_put_patch_file_upload_middleware
django-ninja middlewares
Last synced: about 1 month ago
JSON representation
A middleware that allows user to upload files using PUT / Patch
- Host: GitHub
- URL: https://github.com/baseplate-admin/ninja_put_patch_file_upload_middleware
- Owner: baseplate-admin
- License: mit
- Created: 2023-03-28T15:16:49.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-22T14:59:05.000Z (10 months ago)
- Last Synced: 2024-03-23T09:21:35.223Z (8 months ago)
- Topics: django-ninja, middlewares
- Language: Python
- Homepage: https://pypi.org/project/ninja-put-patch-file-upload-middleware/
- Size: 39.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Downloads](https://static.pepy.tech/personalized-badge/ninja-put-patch-file-upload-middleware?period=month&units=international_system&left_color=black&right_color=orange&left_text=Downloads)](https://pepy.tech/project/ninja-put-patch-file-upload-middleware)
# ninja_put_patch_file_upload_middleware
This middleware allows users to upload files using the HTTP PUT or PATCH method. Backports the functionality from [django-ninja#719](https://github.com/vitalik/django-ninja/pull/719) which in turn is based on [django-ninja#417 (comment)](https://github.com/vitalik/django-ninja/issues/417#issuecomment-1092545699) which should be available in `django-ninja` if [django-ninja#397](https://github.com/vitalik/django-ninja/pull/397) is merged ( in that case this middleware works as a backport )## Requirements
* Django 3.2+
* Asgiref 3.6.0+
* Python 3.7+## Installation
1. Install the package using pip :
```bash
pip install ninja_put_patch_file_upload_middleware
```
2. Add the middleware to your middleware stack:```python
# settings.pyMIDDLEWARE = [
...
"ninja_put_patch_file_upload_middleware.middlewares.process_put_patch",
]
```## LICENSE
This package is licensed under the MIT License ( same as `django-ninja` ). See the [LICENSE](https://github.com/baseplate-admin/ninja_put_patch_file_upload_middleware/blob/master/LICENSE) file for more information.
## Feature Complete
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 >_<