Skip to main content

File upload functionality

Project description

Add basic file upload functionality to your Pyramid app.


Prepare environment.

export VIRTUAL_ENV=~/.virtualenvs/crosscompute
virtualenv ${VIRTUAL_ENV}
source ${VIRTUAL_ENV}/bin/activate

export NODE_PATH=${VIRTUAL_ENV}/lib/node_modules
npm install -g browserify uglify-js

Install package.

cd ~/Projects/invisibleroads-uploads
python develop

Add settings. = 32

Configure views.


Call template macro.

{% from 'invisibleroads_uploads:templates/parts.jinja2' import upload_button %}
{{ upload_button(request, id='xyz-upload', text='Browse for xyz', class='xyz') }}

Add callback and activate button.

$('#xyz-upload').on('', function(e, d) {


  • Define, Upload.save_from, Upload.load
  • Replace get_upload_from with Upload.get_from


  • Handle HTTP status code 413 Payload Too Large


  • Ignore multiple clicks on upload button until dialog closes
  • Replace with


  • Add basic upload functionality
  • Ignore multiple clicks on upload button for a few seconds

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
invisibleroads_uploads- (16.2 kB) Copy SHA256 hash SHA256 Wheel py3
invisibleroads-uploads- (13.5 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page