File upload handler for SwampDragon
Project description
SwampDragon fileupload
======================
File upload handler for SwampDragon
# Installation
```pip install swampdragon-fileupload```
Add ```swampdragon_upload``` to ```INSTALLED_APPS```
# Usage
Create a router and extend ```FileUploadHandler```
class FileUpload(FileUploadHandler):
route_name = '_sdfileupload'
In the above example, the route is set to _sdfileupload.
File post requests should be done to ```window.swampDragon.url + '/_sdfileupload/'```
The data returned by the post request will fit the file deserializer.
To enable Origin header check, set ```origin_check = True```
class FileUpload(FileUploadHandler):
route_name = '_sdfileupload'
origin_check = True
# Notes
If you are using NGINX and have ```origin_check = True``` you need to set ```proxy_set_header Host $http_host;```
in your NGINX config:
server {
...
location / {
...
proxy_set_header Host $http_host;
}
}
======================
File upload handler for SwampDragon
# Installation
```pip install swampdragon-fileupload```
Add ```swampdragon_upload``` to ```INSTALLED_APPS```
# Usage
Create a router and extend ```FileUploadHandler```
class FileUpload(FileUploadHandler):
route_name = '_sdfileupload'
In the above example, the route is set to _sdfileupload.
File post requests should be done to ```window.swampDragon.url + '/_sdfileupload/'```
The data returned by the post request will fit the file deserializer.
To enable Origin header check, set ```origin_check = True```
class FileUpload(FileUploadHandler):
route_name = '_sdfileupload'
origin_check = True
# Notes
If you are using NGINX and have ```origin_check = True``` you need to set ```proxy_set_header Host $http_host;```
in your NGINX config:
server {
...
location / {
...
proxy_set_header Host $http_host;
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Close
Hashes for SwampDragon-fileupload-0.1.2.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0bf676580b4ef1b3c6a32ae7c86126624a51f1898608bd41f23123e9183634d |
|
MD5 | 309216c83e0267e484735dfead7d7d2a |
|
BLAKE2b-256 | bb2a384468b35217a7ae9a1ee39d3d1c5cd74d29eb30addcbd10e88645d7ebb4 |
Close
Hashes for SwampDragon-fileupload-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e47fe9d4d3562461e6fd2b7021c0c3842dfc1e8121dfdda621a4d907124239b |
|
MD5 | 56a44b283e1432631a63f84f020e048c |
|
BLAKE2b-256 | 4149eab663512b35ede4a9cea83f4049506e60eafa04304be2a8bc3fbe7fab8f |