Closed EdoElgx closed 6 months ago
Hello @EdoElgx ,
Remove abstract: 'I am just testing'
line from:
const uploadInstance = AttachmentsCollection.insert({
file,
chunkSize: 'dynamic',
}, false);
If you need to pass additional data along with a file use meta
object, like:
const uploadInstance = AttachmentsCollection.insert({
file,
chunkSize: 'dynamic',
meta: {
abstract: 'I am just testing'
}
}, false);
Hope that helps, let me know
Thank you, @dr-dimitru. I'll try that.
Is there any way to validate what I pass in the meta property?
@EdoElgx yes you can define schema for meta
object
Thanks @dr-dimitru I'll try that.
Inserting without schema worked perfectly.
@EdoElgx I'm glad it was solved quickly
I'm having an issue:
Give an expressive description of what is went wrong When uploading a file with a custom schema, it fails with this error:
Version of
Meteor-Files
you're experiencing this issueVersion of
Meteor
you're experiencing this issue 2.15Where this issue appears? OS (Mac/Win/Linux)? Browser name and its version?
Is it Client or Server issue? Client. It seems the schema is validated at the client.
Client Code:
Server Code:
debug
option