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.id.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.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e636469342d3c1a69051d26f015bfa67b731e8d0ed1a0d3f3b60dbe336b66731 |
|
MD5 | e7f82c687e2bac5cecd3fea2e11c3771 |
|
BLAKE2b-256 | 9e86e7486a9c44dea25d66f3987e22d31ab89f9d16ea7280cd41483896fe43bf |