Angular.js and Amazon S3 - How to upload files?

I have an application in Angular.js. In truth, I did an update on my old site, changed it to Angular.

In the old version, I used the jQuery download component to load on Amazon S3. But now, Angular, I cannot use this.

I want to use the "ngUpload" directive. But I do not know how to do this. Can anybody help me?

+5
source share
4 answers

You can use angular-file-upload a light angular directive that supports file progress and file crash.

Amazon S3 , , : https://github.com/danialfarid/angular-file-upload/issues/23

S3 1.1.1 .

: https://github.com/danialfarid/angular-file-upload/issues/23

+5

S3 HTML-, POST- S3. HTML POST.

API API AWS. .

:

  <input type="hidden" name="AWSAccessKeyId" value="YOUR_AWS_ACCESS_KEY"> 
  <input type="hidden" name="acl" value="private"> 
  <input type="hidden" name="success_action_redirect" value="http://yourdomain/">
  <input type="hidden" name="policy" value="YOUR_POLICY_DOCUMENT_BASE64_ENCODED">
  <input type="hidden" name="signature" value="YOUR_CALCULATED_SIGNATURE">

Amazon Java, Python Ruby.

http://aws.amazon.com/articles/1434

+7

, "" IAM API SDK AWS JS, . , .

Angular, AWS S3 JS SDK, CORS IAM. , , , .

I'v : http://www.cheynewallace.com/uploading-to-s3-with-angularjs/

+2

, s3-file-upload angular , - https://github.com/vinayvnvv/s3FileUpload p >

0

All Articles