Instructions & Limitations

Browser Compatibility

All HTML5 browsers are supported for single and multi-file operations. Uploading nested directories is supported by the current versions of Firefox, Google Chrome, and Safari. See issue #1 for more information about browser support.

Amazon S3 Configuration

Please see the Bagger-JS documentation at https://github.com/LibraryOfCongress/bagger-js/ for the full details about CORS and IAM policies required on the target bucket.

CORS

All modern browsers apply CORS restrictions to requests made by JavaScript. This means that an S3 bucket must have a CORS policy defined following the instructions in the S3 CORS configuration section of the AWS SDK for JavaScript documentation .

The configuration below is known to work:

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedMethod>PUT</AllowedMethod>
    <AllowedMethod>POST</AllowedMethod>
    <AllowedMethod>DELETE</AllowedMethod>
    <AllowedMethod>GET</AllowedMethod>
    <AllowedMethod>HEAD</AllowedMethod>
    <AllowedHeader>*</AllowedHeader>
    <AllowedHeader>authorization</AllowedHeader>
    <AllowedHeader>content-type</AllowedHeader>
    <AllowedHeader>x-amz-date</AllowedHeader>
    <AllowedHeader>x-amz-user-agent</AllowedHeader>
    <ExposeHeader>ETag</ExposeHeader>
    <ExposeHeader>x-amz-server-side-encryption</ExposeHeader>
    <ExposeHeader>x-amz-request-id</ExposeHeader>
    <ExposeHeader>x-amz-id-2</ExposeHeader>
</CORSRule>
</CORSConfiguration>