Meteor-Files icon indicating copy to clipboard operation
Meteor-Files copied to clipboard

Version 3.0.0-beta.6 onBeforeUpload does not support async db calls

Open hluz opened this issue 1 year ago • 5 comments

Hi @dr-dimitru,

Trying to upgrade to Meteor 3, but the lack of support for async db calls from onBeforeUpload is blocking it. The Meteor 3 pull request here: https://github.com/veliovgroup/Meteor-Files/pull/884 appears to have this fix added after 3.0.0-beta.6 has been published... Any chance of publishing a 3.0.0-beta.7?

Pretty please.... on my knees...

hluz avatar Nov 05 '24 07:11 hluz

Still waiting for beta.7 with the async onBeforeUpload.

@hluz did you find any workaround?

fracz avatar Mar 22 '25 17:03 fracz

Still waiting for beta.7 with the async onBeforeUpload.

@hluz did you find any workaround?

@fracz,

The workaround it to declare the onBeforeUpload as async but only issue async db calls in the server. For that of course you will have to wrap selected code in if (Meteor.isServer) blocks. If you need to handle any returned messages, do it from the upload onError event.

Hope it helps.

hluz avatar Mar 24 '25 11:03 hluz

@hluz @fracz I'm working on it, will make these options async

dr-dimitru avatar Mar 24 '25 11:03 dr-dimitru

@hluz @fracz v3.0.0-beta.7 is out, give it a try

dr-dimitru avatar Mar 24 '25 21:03 dr-dimitru

@fracz @hluz ostrio:[email protected] is out, give it a try

dr-dimitru avatar Mar 26 '25 22:03 dr-dimitru

Works for me, thank you!

fracz avatar Jun 26 '25 22:06 fracz

Feel free to reopen it in case if the issue is still persists on your end.

dr-dimitru avatar Sep 24 '25 08:09 dr-dimitru