Skip to main content

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 and activate button.

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

0.4

  • Define Upload.save, Upload.save_from, Upload.load

  • Replace get_upload_from with Upload.get_from

0.3

  • Handle HTTP status code 413 Payload Too Large

0.2

  • Ignore multiple clicks on upload button until dialog closes

  • Replace uploaded.ir.upload with uploaded.ir

0.1

  • Add basic upload functionality

  • Ignore multiple clicks on upload button for a few seconds

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.4.2.4.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

invisibleroads_uploads-0.4.2.4-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file invisibleroads-uploads-0.4.2.4.tar.gz.

File metadata

  • Download URL: invisibleroads-uploads-0.4.2.4.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.5

File hashes

Hashes for invisibleroads-uploads-0.4.2.4.tar.gz
Algorithm Hash digest
SHA256 0133d0f10b1c23fefb60ee3fc90a514bb4334a6239ff153bcf7a3a8c9ab6ff7a
MD5 c4047b54c034204ff92c5d4a1b2319f0
BLAKE2b-256 cbc58a0628188f2faa0ef3d473ac6c473bba90150517bd3c4448edec01baa68e

See more details on using hashes here.

File details

Details for the file invisibleroads_uploads-0.4.2.4-py3-none-any.whl.

File metadata

  • Download URL: invisibleroads_uploads-0.4.2.4-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.5

File hashes

Hashes for invisibleroads_uploads-0.4.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cab56ebf9285523c8e07ade812bc0fddb47efe854d7b7edf395554ebd2b8e894
MD5 5458c9071e74ff77eb2cedf0b94cc6a4
BLAKE2b-256 09fbabc6ecba4962e4235b68745cbbf546c5b0e5063089d3e298fed76610e726

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.2.4 This release

2 files

0.4.2.2

1 file

0.4.2.1

1 file

0.4.1

1 file

0.4.0

1 file

0.3.1

1 file

0.3.0

1 file

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.1.1

1 file

0.0.5

1 file

0.0.4

1 file

0.0.3

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page