Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

File and Image upload fields for forms.

Project Description

Right now this package provides 2 widgets, FileField and ImageField. These widgets support file uploading with server side caching. That means that if some other field in the form fails validation, the user wont have to upload the file again. Instead they get the information of the file they included or a thumbnail of the image if it’s an ImageField. An option to remove the file from the form is given too.

The ImageField has a thumbnail preview and allows size validation and automatic resizing when dimensions get past certain values (this isn’t enabled by default).

If Lightbox is installed (optional), the full size images will be displayed with it (non popup image viewer). Also an animation removing the file attached to the form will be shown if Scriptculous is installed (optional). The server side caching is done using the TemporaryFile class from the official Python tempfile module. It’s a secure way to store files on a platform independent way. The files are cleared when they are not used anymore.

The widgets need a controller that will be the file server for the download links and images previews. You can import the controllers from file_fields.controllers (PicServer and FileServer) and specify the url on the widget constructors (file_server_url, image_server_url)

The easiest and recommended way is enabling the extension your dev.cfg, prod.cfg or app.cfg adding:

file_field_server.on = True

Release History

Release History

This version
History Node

0.1a7.dev-r2292

History Node

0.1a6.dev-r1868

History Node

0.1a6.dev-r1048

History Node

0.1a6.dev-r612

History Node

0.1a6.dev-r464

History Node

0.1a5.dev-r444

History Node

0.1a5.dev-r443

History Node

0.1a5.dev-r421

History Node

0.1a4.dev-r420

History Node

0.1a3.dev-r415

History Node

0.1a2.dev-r343

History Node

0.1a2.dev-r342

History Node

0.1a1.dev-r334

History Node

0.1a1.dev-r319

History Node

0.1a0.dev-r319

History Node

0.1a0.dev-r301

History Node

0.1a0.dev-r296

History Node

0.1a0.dev-r295

History Node

0.1a0.dev-r294

History Node

0.1a0.dev-r293

History Node

0.1a0.dev-r291

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
FileFields-0.1a7.dev-r2292.tar.gz (8.9 kB) Copy SHA256 Checksum SHA256 Source Aug 13, 2008

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting