Skip to main content

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:

<head>
{{ dropzone.load_css() }}
</head>
<body>
...
{{ dropzone.load_js() }}
</body>

You can assign the version of Dropzone.js through version argument, the default value is 5.2.0. Step 3: Creating a Drop Zone with create(), and configure it with config():

{{ dropzone.create(action='the_url_which_handle_uploads') }}
...
{{ dropzone.config() }}

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Flask-Dropzone-1.4.4.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Flask_Dropzone-1.4.4-py2.py3-none-any.whl (20.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file Flask-Dropzone-1.4.4.tar.gz.

File metadata

File hashes

Hashes for Flask-Dropzone-1.4.4.tar.gz
Algorithm Hash digest
SHA256 0bfb001dc2f062628b638b171a369dc9744a1a5f19c0aae1e94417b4c0fbfc63
MD5 5e7220d3eae5dfb7be6ce96cb1fdf09a
BLAKE2b-256 f77e9304878687fe329fba04cb1b9b6126839d436c5e0015e3a22478dd3dee9f

See more details on using hashes here.

File details

Details for the file Flask_Dropzone-1.4.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for Flask_Dropzone-1.4.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c36572ba422c8b21d183382e68752bf8c9184fe08bc3ec87fd6afa840f6ebc63
MD5 5677ca34692ac610b6c1e9d80aa2f813
BLAKE2b-256 19f2ccfc44e1fcaa5ab1ac8975357291df4ae8863be59d9cf14d34bd034513c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page