I would like to use a mongodb model with the GridFSBucket.
I realized that you can use the metadata with GridFSUploadOptions, and it seems to function as the model in this case, but i get an error, "TypeError: mongodb.GridFSUploadOptions is not a constructor" when i use it
let bucket = new mongodb.GridFSBucket(conn.db, {
bucketName: 'tracks'
});
let options = new mongodb.GridFSUploadOptions();
let uploadStream = bucket.openUploadStream(trackName, options.metadata(new Document("Speaker", "Bill Gates").append("Duration", "1hr")));
I expect to have a way to add more user information added to the file created.