Meteor-Files: Error when uploading File object from Blob.
Hi, I created a File object from Blob using new File([blob], filename), but its getting this error: collection.onBeforeUpload() returned false [403] when I try to upload the new File.
Is there a way to make this Blob to File conversion valid on onBeforeUpload()?
Also, is there a right way to upload Blob objects? The Images.write() function can only be used on the server, and passing a Blob to server via Meteor.call only turns that Blob input into an empty object.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (8 by maintainers)
Hi @martunta, turns out
Insert( )does acceptBlobobjects as long object values has name and extension. To do this, just insert a name with extension to theBlobobject:blob.name = "filename.jpg"If that doesn’t work, you can also use Underscore function:
_.extend(blob, { name: "filename.jpg" })