Skip to main content

File upload functionality

Project description

Add basic file upload functionality to your Pyramid app.

Use

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 setup.py develop
bash refresh.sh

Configure views.

config.include('invisibleroads_uploads')

Call template macro.

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

Add script.

$('#abc-upload').on('uploaded.ir.upload', function(d) {
    console.log('Uploaded xyz');
    console.log(d);
});

0.0.2

  • Ignore multiple clicks on upload button for a few seconds

0.0.1

  • Add basic upload functionality

Project details


Download files

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

Source Distribution

invisibleroads-uploads-0.0.3.tar.gz (14.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page