vsivsi/meteor-file-collection

we found a bug that will cause cordova http request fail on production env

Closed this issue · 5 comments

https://github.com/vsivsi/meteor-file-collection/blob/master/src/resumable_client.coffee#L30

url = Meteor.absoluteUrl(url) if Meteor.isCordova

above line produce two slash that you won't make request work on "request handler"

http://www.example.com:3000//gridfs/files/_resumable // failed

somethings should like this

url = Meteor.absoluteUrl(url.replace /^\//, '') if Meteor.isCordova

test on 1.3.4.2 vsivsi 1.3.5

if you're running dev "meteor run ios-device" all works well, but not production

meteor build ../test // will failed upload

we spent weeks on this, pls review

http://docs.meteor.com/api/core.html#Meteor-absoluteUrl

A path to append to the root URL. Do not include a leading "/".

I see. One wonders why Meteor doesn't just make .absoluteUrl() do the right thing...

Fixed in 1.3.6 on Atmosphere now. Thanks for the PR!