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.
upload.id.length = 32
Configure views.
config.include('invisibleroads_uploads')
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.
$('#xyz-upload').on('uploaded.ir.upload', function(x) { console.log(x.upload_id); });
0.2
Ignore multiple clicks on upload button until dialog closes
0.1
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.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e85efaff8fc588b72e25ad6a9d78786aeb2b9e7afb91607d43952ac9cb0eac81 |
|
MD5 | 862029f3884e4fded1dab474bbb4ac11 |
|
BLAKE2b-256 | 9220a85175b7849a9aba94c5d1e8e843267e564b474dd193481491b5805c98ea |