{
"info": {
"author": "YunoJuno",
"author_email": "code@yunojuno.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 1.11",
"Framework :: Django :: 2.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.6"
],
"description": "django-s3-upload\n================\n\nCompatibility\n-------------\n\nThis library is now Python3 and Django1.11 and above only.\n\nUpload files directly to S3 from Django\n-------------------------------------\n\n[](https://travis-ci.org/yunojuno/django-s3upload)\n\nThis project allows direct uploading of a file from the browser to AWS S3 via a file input field rendered by Django.\n\nThe uploaded file's URL is then saveable as the value of that field in the database.\n\nThis avoids the problem of uploads timing out when they go via a web server before being handed off to S3.\n\nFeatures include:\n\n* displaying a progress bar\n* support for ACLs (eg, private uploads)\n* support for encrypted-at-rest S3 buckets\n* mimetype and file extension whitelisting\n* specifying different bucket destinations on a per-field basis\n\n## Installation\n\nInstall with Pip:\n\n```pip install django-s3-upload```\n\n## AWS Setup\n\n### Access Credentials\n\nYou have two options of providing access to AWS resources:\n\n1. Add credentials of an IAM user to your Django settings (see below)\n2. Use the EC2 instance profile and its attached IAM role\n\nWhether you are using an IAM user or a role, there needs to be an IAM policy\nin effect that grants permission to upload to S3:\n\n```json\n\"Statement\": [\n {\n \"Effect\": \"Allow\",\n \"Action\": [\"s3:PutObject\", \"s3:PutObjectAcl\"],\n \"Resource\": \"arn:aws:s3:::your-bucket-name/*\"\n }\n]\n```\n\nIf the instance profile is to be used, the IAM role needs to have a\nTrust Relationship configuration applied:\n\n```json\n\"Statement\": [\n\t{\n\t\t\"Effect\": \"Allow\",\n\t\t\"Principal\": {\n\t\t\t\"Service\": \"ec2.amazonaws.com\"\n\t\t},\n\t\t\"Action\": \"sts:AssumeRole\"\n\t}\n]\n```\n\nNote that in order to use the EC2 instance profile, django-s3-upload needs\nto query the EC2 instance metadata using utility functions from the\n[botocore] [] package. You already have `botocore` installed if `boto3`\nis a dependency of your project.\n\n### S3 CORS\n\nSetup a CORS policy on your S3 bucket.\n\n```xml\n