Upload file in Flask with Dropzone.js.
Project description
Flask-Dropzone packages Dropzone.js into an extension to add file upload support for Flask. It can create links to serve Dropzone from a CDN and works with no JavaScript code in your application.
Basic Usage
Step 1: Initialize the extension:
from flask_dropzone import Dropzone dropzone = Dropzone(app)
Step 2: In your <head> section of your base template add the following code:
{{ dropzone.load() }}
You can assign the version of Dropzone.js through version argument, the default value is 5.1.1. Step 3: Creating a Drop Zone with create():
{{ dropzone.create(action_view=’upload_view’) }}
Also to edit the action view to yours.
Beautify Dropzone
Style it according to your preferences through style() method:
{{ dropzone.style(‘border: 2px dashed #0087F7; margin: 10%; min-height: 400px;’) }}
More Detail
Go to Github page , which you can check for more details.
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 Distribution
Built Distribution
Hashes for Flask_Dropzone-1.4.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b616f6174a73f8fc089f1f8d28eaa89eb846233ce349a7288eab50c3bb41dde9 |
|
MD5 | 575767b135437e3f7103652786abdff5 |
|
BLAKE2b-256 | e78c042180ae0894260d3fae5b0b587f9669e86e2694c23d11a5006de519906b |