Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 609 Bytes

SETUP.md

File metadata and controls

18 lines (16 loc) · 609 Bytes

CORS setup for Amazon S3

The Dropzone.js script allows us to upload files to Amazon S3 directly from the client. To do this we need to set up CORS on S3 using the following template:

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <CORSRule>
    <AllowedOrigin>https://www.openhumans.org/</AllowedOrigin>
    <AllowedMethod>PUT</AllowedMethod>
    <AllowedMethod>POST</AllowedMethod>
    <AllowedMethod>GET</AllowedMethod>
    <MaxAgeSeconds>3000</MaxAgeSeconds>
    <AllowedHeader>*</AllowedHeader>
  </CORSRule>
</CORSConfiguration>