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

Metadata

Release files for invisibleroads-uploads 0.4.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for invisibleroads-uploads 0.4.2.4
File Size Uploaded
invisibleroads-uploads-0.4.2.4.tar.gz 13.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for invisibleroads-uploads 0.4.2.4
File Interpreter ABI Platform
invisibleroads_uploads-0.4.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 29.7 kB

Release files / invisibleroads-uploads-0.4.2.4.tar.gz

Download URL invisibleroads-uploads-0.4.2.4.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0133d0f10b1c23fefb60ee3fc90a514bb4334a6239ff153bcf7a3a8c9ab6ff7a
BLAKE2b-256 checksum
How to use checksums
cbc58a0628188f2faa0ef3d473ac6c473bba90150517bd3c4448edec01baa68e
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / invisibleroads_uploads-0.4.2.4-py3-none-any.whl

Download URL invisibleroads_uploads-0.4.2.4-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cab56ebf9285523c8e07ade812bc0fddb47efe854d7b7edf395554ebd2b8e894
BLAKE2b-256 checksum
How to use checksums
09fbabc6ecba4962e4235b68745cbbf546c5b0e5063089d3e298fed76610e726
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.4.2.4 This release

2 release files

0.4.2.2

1 release file

0.4.2.1

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.1.1

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page