Closed mzygmunt closed 8 years ago
Hi, what version of file-collection are you using?
The last few versions return 204 to indicate missing chunks to resumable.js, and 204 doesn't log to the console. See: https://github.com/vsivsi/meteor-file-collection/blob/master/src/resumable_server.coffee#L244
If you are using the latest version, then I have no idea where that 404 is coming from.
I'm using latest 1.3.0 version.
I just reconfirmed using the file-collection sample app that no 404
errors are logged to the browser console when using 1.3.0 to upload files. Something must be different about your app.
I suggest you try the sample app yourself and confirm that 1.3.0 doesn't log 404s on your own system.
I solved my problem. I defined the collection in this way:
myFiles = new FileCollection('myFiles',
{ resumable: true,
http: [
{ method: 'get',
path: '/:md5',
lookup: function (params, query) {
return { md5: params.md5 };
}
}
]
}
);
and it should be like this:
myFiles = new FileCollection('myFiles',
{ resumable: true,
http: [
{ method: 'get',
path: '/md5/:md5', //changed
lookup: function (params, query) {
return { md5: params.md5 };
}
}
]
}
);
Glad you found the issue!
FYI, you weren't crazy, this appears to be a route precedence issue with the built-in resumable support. See: https://github.com/vsivsi/meteor-file-collection/issues/84
See https://github.com/vsivsi/meteor-file-collection/issues/84#issuecomment-178949348 for my proposed fix, on the dev
branch now.
Fixed in 1.3.1
Hello, Thank you for your hard work on File-Collection! Everything works great, except for the display of 404 in the console for each chunk. I know that this is correct and the file is saved, but the console is unnecessarily cluttered. Is it possible to do something about it? My FC version is 1.3.0 and Meteor 1.2.1 without any additional packages.