Skip to main content

Add direct uploads to S3 functionality with a progress bar to file input fields within Django admin.

Project description

django-s3direct
===============

Upload files direct to S3 from Django
-------------------------------------


Add direct uploads to AWS S3 functionality with a progress bar to file input fields within Django admin.

![screenshot](https://raw.github.com/bradleyg/django-s3direct/master/screenshot.png)


## Installation

Install with Pip:

```pip install django-s3direct```


Update Django files:

```python
# settings.py
INSTALLED_APPS = [
...
's3direct',
...
]
S3DIRECT_DIR = 's3direct' # (optional, default is 's3direct')
AWS_SECRET_ACCESS_KEY = ''
AWS_ACCESS_KEY_ID = ''
AWS_STORAGE_BUCKET_NAME = ''
```

```python
# urls.py
urlpatterns = patterns('',
url(r'^s3direct/', include('s3direct.urls')),
)
```

```python
# models.py
from django.db import models
from s3direct.fields import S3DirectField

class Example(models.Model):
thumbnail = S3DirectField(upload_to='s3direct')
# 'upload_to' is an optional argument
```

You may need to run `collectstatic` before `s3direct` will work correctly on your public website:

```bash
python manage.py collectstatic
````

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

django-s3direct-0.1.3.tar.gz (61.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page