asafdav / ng-s3upload

Upload to S3 using AngularJS
MIT License
190 stars 83 forks source link

After selecting the file nothing happens #27

Closed jayrmotta closed 10 years ago

jayrmotta commented 10 years ago

I'm trying to integrate my frontend with S3 and thus I've decided to use this directive to help.

I have coded the config as instructed in the README and something like this is being returned:

{
   "policy":"eyJleHBpcmF0aW9uIjogIjI...sIDQxOTQzMDQwXV19",
   "signature":"4eIITW8....m6fp0=",
   "key":"4wv9VESY....pKeAkCyY"
}

Before applying the encryption my policy was:

{
   "expiration":"2020-12-01T12:00:00.000Z",
   "conditions":[
      {
         "bucket":"defina-se-videos"
      },
      [
         "starts-with",
         "$key",
         ""
      ],
      {
         "acl":"private"
      },
      [
         "starts-with",
         "$Content-Type",
         "videos/"
      ],
      [
         "content-length-range",
         0,
         41943040
      ]
   ]
}

But when I run the html with the following configuration, I see a pre-flight request being made and nothing else happens:

I'm selecting a file that fits on the content length I've configured and I have also tried changing acl, adding a prefix, etc..

Do you have any tip to help me figure out what is happening?

Thanks in advance!

nukulb commented 10 years ago

Is your bucket setup for accepting requests from *

I have a readme here for bucket configuration https://github.com/hubba/s3-angular-file-upload

Sent from my iPhone

On Jun 19, 2014, at 6:56 PM, Jayr Motta notifications@github.com wrote:

I'm trying to integrate my frontend with S3 and thus I've decided to use this directive to help.

I have coded the config as instructed in the README and something like this is being returned:

{"policy":"eyJleHBpcmF0aW9uIjogIjIwMjAtMTItMDFUMTI6MDA6MDAuMDAwWiIsImNvbmRpdGlvbnMiOiBbIHsiYnVja2V0IjogImRlZmluYS1zZS12aWRlb3MifSxbInN0YXJ0cy13aXRoIiwgIiRrZXkiLCAiIl0seyJhY2wiOiAicHJpdmF0ZSJ9LFsic3RhcnRzLXdpdGgiLCAiJENvbnRlbnQtVHlwZSIsICJ2aWRlb3MvIl0sWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsIDAsIDQxOTQzMDQwXV19","signature":"4eIITW8OqmP2h2w5XDl8Rlm6fp0=","key":"4wv9VESYHOGyk7/lyKKMsH1l7MgH/qyfpKeAkCyY"} Before applying the encryption my policy was:

{"expiration": "2020-12-01T12:00:00.000Z","conditions": [ {"bucket": "defina-se-videos"},["starts-with", "$key", ""],{"acl": "private"},["starts-with", "$Content-Type", "videos/"],["content-length-range", 0, 41943040]]} But when I run the html with the following configuration, I see a pre-flight request being made and nothing else happens:

I'm selecting a file that fits on the content length I've configured and I have also tried changing acl, adding a prefix, etc..

Do you have any tip to help me figure out what is happening?

Thanks in advance!

— Reply to this email directly or view it on GitHub.

captainmarkos commented 10 years ago

Check out this wiki page I made as it might help you out: https://github.com/asafdav/ng-s3upload/wiki/PHP-Creating-the-S3-Policy

asafdav commented 10 years ago

Did you figure it out?

On Fri, Jun 20, 2014 at 2:32 AM, captainmarkos notifications@github.com wrote:

Check out this wiki page I made as it might help you out: https://github.com/asafdav/ng-s3upload/wiki/PHP-Creating-the-S3-Policy

— Reply to this email directly or view it on GitHub https://github.com/asafdav/ng-s3upload/issues/27#issuecomment-46630017.