Step 1: Input Your AWS Details


Step 2: Upload The File

{{ uploadProgress == 0 ? '' : uploadProgress + '%' }}

Blog Post

You can find the blog post that accompanies this app here


  • Creates Unique Bucket Object Name
  • File Input Directive Binds Attributes To $scope.file
  • Validates File Existence
  • Validates File Size (Use Select Box To Test)
  • Validates AWS Credentials

CORS Policy

In order for the demo to work, you will need to add a CORS policy to your AWS bucket to allow uploads from this page (or from your local machine if using the local repo). Details on how to add this policy can found in this article, under the CORS section
Here's a sample policy that you can use to test this demo app

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="">

IAM Policy Warning

Please make sure that if you use this code you create an appropriate IAM account policy to prevent mis-use. Example, a policy like the following would only allow PUT access to the bucket for a specific IAM user. You could also set the bucket objects to automatically expire after 24 hours which would prevent people flooding your account.

  "Version": "2012-10-17",
  "Statement": [
      "Sid": "Stmt126637111000",
      "Effect": "Allow",
      "Action": [
      "Resource": [

Fork This Repo

Want a copy of this app? Fork it now at: