Skip to main content

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.include_dropzone() }}

Step 3: Creating a form element with the class dropzone and id myDropzone in the place where you want to upload file:

<form action="{{ url_for('upload_file') }}" class="dropzone" id="myDropzone" method="POST" enctype="multipart/form-data">
</form>

Also to edit the action to your upload address.

More Detail

Go to Github page , which you can check for more details.

Project details


Download files

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

Files for Flask-Dropzone, version 1.3
Filename, size File type Python version Upload date Hashes
Filename, size Flask-Dropzone-1.3.zip (6.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page