but the onAfterUpload function is not called. I only see the files locally on my computer.
I see them here:
C:\rony\my-server.meteor\local\build\programs\server\assets\app\uploads\attachments
and this is part of my code:
const UserFiles = new FilesCollection({
debug: true, // Change to `true` for debugging
storagePath: 'assets/app/uploads/attachments',
collectionName: 'userFiles',
// Disallow Client to execute remove, use the Meteor.method
allowClientCode: false,
// Start moving files to AWS:S3
// after fully received by the Meteor server
onAfterUpload(fileRef) {
I’m adding “import S3 from ‘aws-sdk/clients/s3’;”
and the app crashes on:
var zeroBuffer = new Buffer(intSize); zeroBuffer.fill(0);
Buffer is not defined
Now onBeforeUpload is called, and I return true;
onAfterUpload is still not called.
I have this on the console:
“[FilesCollection] [UploadInstance] [sendEOF] false”
from core.js