AWS. Security. Multi-part Upload. S3. Cloudfront. cdn. Performance. Large file uploads ( 5GB). STS. Temporary Tokens. AWS JS SDK Secure, fast uploads for large files directly from browser to s3 By Aameer Rafiq Wani February 18, 2018 Comment Permalink Like Tweet +1. S3 Browser will help you organize your Amazon S3 buckets and files. Create public URLs to share the files. Upload and download files to and from Amazon S3. Keep your files backed up on a multiple. Uploading files to S3 directly from the browser is a great way to increase performance by removing the need to process and then re-upload files from your own server. Note: In this post we'll be examining the use of pre-signed POST requests. See pre-signed URLs as an alternative (less powerful) method. Frantic-S3-Browser is a file browser and uploader for Amazon S3. Fully HTML5 based, no server needed. You can serve Frantic-S3-Browser from a single bucket and then create a bucket for each customer/project you want to serve. The savings of storing infrequently used file system data on Amazon S3 can be a huge cost benefit over the native AWS file share solutions. It is possible to move and preserve a file system in Amazon S3, from where the file system would remain fully usable and accessible. However, one consideration is how to migrate the file system to Amazon S3.
Latest versionReleased:
An S3 fix for Mezzanine's media manager.
Project description
This app overrides the default Mezzanine filebrowser to do 'the same but then using AWS S3'.
## Installation
Use pip:
```
$> pip install filebrowser_s3
```
## Using filebrowser_s3 with Mezzanine
In your Mezzanine settings.py (or local settings file), add filebrowser_s3 as an installed app:
```
INSTALLED_APPS = [
...,
'filebrowser_s3',
]
```
You will need to make sure that the correct storage class is used as `DEFAULT_FILE_STORAGE`. You could do this with a straight assignment, but conditional switching is recommended, as in the following example code assumes an `env()` function for intelligently fetching environment variables):
```
# Determine which storage solution to use. Typically, you
# want filesystem storage for local dev work, but S3 storage
# for staging/production instances.
USE_S3 = env('USE_S3')
if USE_S3:
DEFAULT_FILE_STORAGE = 'filebrowser_s3.storage.S3MediaStorage'
AWS_ACCESS_KEY_ID = env('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = env('AWS_SECRET_ACCESS_KEY')
AWS_STORAGE_BUCKET_NAME = env('AWS_STORAGE_BUCKET_NAME')
AWS_LOCATION = env('AWS_LOCATION')
FILEBROWSER_DIRECTORY = AWS_LOCATION
MEDIA_ROOT = '
AWS_S3_CUSTOM_DOMAIN = env('AWS_S3_CUSTOM_DOMAIN', default=None)
if AWS_S3_CUSTOM_DOMAIN is None:
MEDIA_URL = '...your public AWS bucket URL with protocol and trailing slash'
else:
MEDIA_URL = 'https://' + AWS_S3_CUSTOM_DOMAIN + '/'
else:
MEDIA_ROOT = ...
MEDIA_URL = ...
```
## Variables documentation
When using the s3 storage class, required setting variables are:
- `DEFAULT_FILE_STORAGE`- This must be `filebrowser_s3.storage.S3MediaStorage` for obvious reasons.
- `AWS_ACCESS_KEY_ID` - Your AWS access key.
- `AWS_SECRET_ACCESS_KEY` - Your AWS secret.
- `AWS_STORAGE_BUCKET_NAME` - The bucket name to use on your AWS account.
- `AWS_S3_CUSTOM_DOMAIN` - Whatever custom domain you need used, such as 'assets.mydomain.com'.
- `MEDIA_ROOT` - The Mezzanine filesystem root. When using the S3 storage class this should be set to `'`.
- `MEDIA_URL` - The fully qualified domain URL that Mezzanine can link to. This includes the protocol and trailing slash, and so will typically be of the form `'https://' + AWS_S3_CUSTOM_DOMAIN + '/'`.
There are also two fairly special variables that must be specified:
- `AWS_LOCATION` - Used by django-storages as your S3 'top level' directory for uploads.
- `FILEBROWSER_DIRECTORY` - Used by filebrowser_safe as the 'top level' directory in which to browse.
You typically want these two values to be the same. So that the media browser looks for uploaded images in the same top level 'directory' that botos3 treats as top level upload path.
Release historyRelease notifications RSS feed
1.0.0
0.1.18
0.1.17
0.1.15
0.1.14
0.1.13
0.1.12
0.1.11
0.1.10
S3 Browser Mac
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
S3 File Browser Icon
0.1.3
0.1.2
0.1.1
0.1.0
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
S3 File Browser Settings
0.0.1
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size filebrowser_s3-1.0.0.tar.gz (6.9 kB) | File type Source | Python version None | Upload date | Hashes |
S3 Browser Review
Hashes for filebrowser_s3-1.0.0.tar.gz
Algorithm | Hash digest |
---|---|
SHA256 | 425f751f26d9c67be5007313b363c274cc3680b72aed826b26538334693993f2 |
MD5 | b1f7c90853babcaace6330621a6c571c |
BLAKE2-256 | 3ce52ca8c2c1a7aa669f8b2cf4ed14a45e6e5bbda45e57e653e20dc2270ba110 |