asafdav / ng-s3upload

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

bucket evaluation not working #50

Closed akobler closed 9 years ago

akobler commented 9 years ago

First thanks for providing this cool piece of software!

I encounter the following problem: If I print the value of bucket (assigned at line 40 in https://github.com/asafdav/ng-s3upload/blob/v0.1.2/src/ng-s3upload/directives/s3-upload.js) to the console, it is -1. After changing

var bucket = scope.$eval(attrs.bucket); to var bucket = attrs.bucket;

the HTML template looks like:

<div id="uploader" s3-upload bucket="{{env.s3Bucket}}" ng-model="files.first" s3-upload-options="{{s3options}}" do-upload="performUpload"></div>

whereby env holds some environment variables.

I get the right value. Is it a bug? Thanks for any hints/suggestions.

Versions:

asafdav commented 9 years ago

You shouldn't change anything, you don't need to use curly braces for the bucket attribute and it will work for you.

akobler commented 9 years ago

I see, it works perfectly without the curly braces. Thank you!

asafdav commented 9 years ago

You're welcome