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

Big File Transfer Application written in Django

Project Description


django-bft is a Django application that handles large file transfers. The application’s frontend has both a flash upload as well as a javascript upload version.

django-bft was origianlly created for Utah State University to fulfill a specific need of sending large files through email.

The site can be viewed at


  1. Web server

    Apache using mod-wsgi is the prefered web server of choice and, currently, is the only web server that has been tested with django-bft. Web servers such as Lighttp and Nginx may work, but have not been tested.

    Note: django-bft uses ajax to display a progress bar during upload. As such, the Django development web server will not be able to upload files since it is only single threaded.

  2. Database

    All databases supported by Django should work with django-bft. (Postgres, MySQL, and Oracle)

  3. Django

    django-bft has been created using the latest version of Django (1.3). Django 1.1x or later will probably work, but with the change in how static files are handled, you are advised to install django-staticfiles for static file serving.

    Refer to:


To get this application up and running, please follow the steps below:

  1. Create a Django production environment using the setup of your choice. Refer to:

  2. Create a new Django Project:

    $ startproject <projectname>
  3. Install django-bft to either your PYTHON_PATH or in a folder inside your project:

    • Install from pip:

      $ pip install django-bft
    • Download and install from source:

      $ python install
    • Install source to local directory:

      $ python build
      $ cp build/lib/bft /<PROJECT_ROOT>/
  4. Add the following to your file:

    • Add ‘bft’, ‘staticfiles’ and ‘admin’ to INSTALLED_APPS:

    • Make sure your static file finders are configured:

    • Add ‘bft.context_processors.bft’ to the context processors:

      from django.conf import global_settings
      ) + global_settings.TEMPLATE_CONTEXT_PROCESSORS
    • Add ‘bft.utils.upload_handlers.UploadProgressCachedHandler’ to the file upload handlers:

      from django.conf import global_settings
      ) + global_settings.FILE_UPLOAD_HANDLERS
    • (Optional) - You might want to change the location of the FILE_UPLOAD_TEMP_DIR. This setting is the location of where files will be temporarily be stored while uploading. The default for this is the operating systems temp directory. If space is limited at this directory, it is advised to change this setting.

  5. Modify as needed.

  6. If reCaptcha is to be used, a public and private key will be needed.

    Refer to:

    The python reCaptcha library is also required. You can install it onto your PYTHON_PATH by using pip:

    $ pip install recaptcha-client
  7. Because this app is designed to upload very large files, enforcing size restrictions using Django is not recomended and rarly works. It is better to add this enforcement on the web server layer. You can do this on Apache by adding the following directives to your Apache config:

    LimitRequestBody 1073741824 #The same size as specified in your file
    ErrorDocument 413 http://<SERVER_NAME>/413error/
  8. If you care about your files being secured, you will probably want to protect the directory where files are stored using apache:

    <Location /media/files>
            Order allow,deny
            Deny from all

    You may also want to consider adding the necessary directives to redirect non-ssl traffic over to ssl:

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
  9. Map your to django-bft’s urls. An example of this would be:

    urlpatterns = patterns('',
            (r'', include('bft.urls')),
  10. Setup a cron job to handle file archiving and deletion. An example of this could be:

    ./ deleteuploads
    ./ deletetempfiles
  11. Don’t forget to collect your static files and sync your database:

    $ python syncdb
    $ python collectstatic

Release History

This version
History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(197.5 kB) Copy SHA256 Hash SHA256
Source None Apr 29, 2011

Supported By

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 Google Google Cloud Servers