vsivsi / meteor-file-collection

Extends Meteor Collections to handle file data using MongoDB gridFS.
http://atmospherejs.com/vsivsi/file-collection
Other
159 stars 37 forks source link

403 on attempted file upload #87

Closed jdmswong closed 8 years ago

jdmswong commented 8 years ago

Hi @vsivsi, love the package so far. The sample app works great and I have been porting some parts over to my production application. However when I drag a file to upload the console returns:

 https://my.url/gridfs/fs/_resumable?resumableChunkNumber=1&resu…ativePath=testfile.jpg&resumableTotalChunks=1 403 

resumable.js:648 

followed by a number of:

POST https://my.url/gridfs/fs/_resumable 403 (Forbidden)

resumable.js:766 

errors on the client.

Haven't found anybody else with this problem, however I have known Iron Router to hijack all client routes, and may be interfering with this. Can you shed some light on this?

vsivsi commented 8 years ago

Without seeing any code its pretty hard to know what is happening. I've used file-collection with Iron Router, but it probably depends on how they are each configured.

One thing you definitely need to do is create an fc.allow rule for 'write' access. Also, make sure the file is being inserted in the collection before attempting to upload data to it. Hope that helps.

jdmswong commented 8 years ago

It was a misconfigured myData.allow()