Change file name onAfterUpload and return it to client.
pisacode opened this issue · 2 comments
Hi,
I am uploading files to S3 and would like to set a file name on server.
I am uploading files with Images.insert() and listening 'end' event.
Since I am changing the filename during onAfterUpload, insert function's event listeners do not offer any callback from onAfterUpload.
What would be the best option to use .insert and then wait to get values from onAfterUpload?
Thanks
Hello @pisacode ,
You can add .uploadedToS3
or similar and set it to true
inside inAfterUpload
hook. Then in other logic block rely on .uploadedToS3 === true
do display image or a "spinner" if it isn't fully uploaded just yet. Let me know of this helped in any way
Feel free to reopen it in case if the issue is still persists on your end.