Skip to content

Commit

Permalink
Add missing "/" at end of awsBucketUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Kristian Flaatten committed Nov 11, 2014
1 parent c823d0e commit 8f56301
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Upload = module.exports = (awsBucketName, opts) ->
@versions = opts?.versions or []

@awsBucketPath = opts?.awsBucketPath or ''
@awsBucketUrl = "https://s3-#{opts?.awsBucketRegion or 'us-east-1'}.amazonaws.com/#{awsBucketName}"
@awsBucketUrl = "https://s3-#{opts?.awsBucketRegion or 'us-east-1'}.amazonaws.com/#{awsBucketName}/"
@awsBucketAcl = opts?.awsBucketAcl or 'privat'

@resizeQuality = opts?.resizeQuality or 70
Expand Down
4 changes: 3 additions & 1 deletion test/suite.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe 'Upload', ->
assert upload.s3 instanceof require('aws-sdk').S3
assert upload.versions instanceof Array
assert.equal upload.awsBucketPath, ''
assert.equal upload.awsBucketUrl, 'https://s3-us-east-1.amazonaws.com/myBucket'
assert.equal upload.awsBucketUrl, 'https://s3-us-east-1.amazonaws.com/myBucket/'
assert.equal upload.awsBucketAcl, 'privat'
assert.equal upload.resizeQuality, 70
assert.equal upload.returnExif, false
Expand Down Expand Up @@ -346,5 +346,7 @@ describe 'Integration Tests', ->
assert.equal typeof image.path, 'string'
assert.equal typeof image.url, 'string'

console.log image.url

done()

0 comments on commit 8f56301

Please sign in to comment.