Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An example application using Django Uploadify S3

tree: a35000ac27

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rst
Octocat-spinner-32 bootstrap.py
Octocat-spinner-32 buildout.cfg
README.rst

Django Uploadify-S3 (DUS3) Example

Copyright (c) 2010, Sam Charrington (@samcharrington), http://geekfactor.charrington.com

Overview

This is an example application that illustrates the use of the DUS3 application.

See https://github.com/sbc/django-uploadify-s3.

Installation

The recommended installation procedure uses virtualenv and buildout.

  1. If you do not already have virtualenv you will need to install it using easy_install virtualenv
  2. Create a new virtualenv 'foo' with virtualenv foo
  3. Activate the virtualenv: cd foo; source bin/activate
  4. Clone the git repo: git clone git://github.com/sbc/django-uploadify-s3-example.git example
  5. Bootstrap the buildout environment: cd example; python bootstrap.py
  6. Run the build: bin/buildout. This will download and install (to the virtualenv) all dependencies including Django, DUS3 and Uploadify
  7. Sync the db: bin/django syncdb
  8. Edit src/settings/common.py, and add your AWS information
  9. Create a crossdomain.xml file and upload it to the root of your S3 bucket
  10. Run the dev server: bin/django runserver

Usage

With installation complete and the dev server running, you may now open your web browswer and go to http://127.0.0.1:8000. From here you can play with the demo app. For example, you can create an Example object and upload a file.

Once you get a feel for what the demo app is doing, you can read the source code and integrate it into your own projects.

Troubleshooting

  1. In order for the browser to communicate to your S3 bucket, you must upload a crossdomain.xml file to the root of your bucket. This example allows any browsers to communicate with your S3 bucket:

    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
      <allow-access-from domain="*" secure="false" />
    </cross-domain-policy>
    
  2. Because Uploadify uses a Adobe Flash component to perform the actual upload, browser-based HTTP debugging tools like Firebug cannot see the traffic between the browser and S3. You can however use a network sniffer like Wireshark (http://www.wireshark.org) to view the traffic.

Something went wrong with that request. Please try again.