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
Add settings.
uploads.tokens.length = 32
Configure views.
config.include('invisibleroads_uploads')
Call template macro.
{% from 'invisibleroads_uploads:templates/parts.jinja2' import upload_button %} {{ upload_button(id='xyz-upload', text='Browse for xyz', class='xyz') }}
Add callback.
$('#xyz-upload').on('uploaded.ir.upload', function(x) { console.log(x.upload_id); });
0.0
Add basic upload functionality
Ignore multiple clicks on upload button for a few seconds
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
Close
Hashes for invisibleroads-uploads-0.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56c1b2b65796433009af7639740243884397c2bec1dc66b0c3d9c454c1405bb6 |
|
MD5 | 8ed9fb139d1b755fbd53a3fdd88c581a |
|
BLAKE2b-256 | 7ca590dc9cca08033aacb890cd044e74084b4a8fd855daf71e7e069110369cca |