EmberDroplet icon indicating copy to clipboard operation
EmberDroplet copied to clipboard

Action returning promise

Open llexical opened this issue 10 years ago • 3 comments

I don't know if I am missing something, but from what I have read an action cannot return a result, however your action appears to be attempting to return a promise, which much to my frustration I could not access unless I modified the file to set the promise to a property I could access.

llexical avatar Sep 30 '14 23:09 llexical

Could you please post an example?

Wildhoney avatar Oct 01 '14 07:10 Wildhoney

Agreed, it is odd for uploadAllFiles to return a promise when it's not easy to get a handle on an action's return value. As a workaround, you can call the action directly through the _actions hash.

this._actions.uploadAllFiles.call(this);

But the lib should probably expose uploadAllFiles more publicly.

john-kurkowski avatar Oct 12 '14 23:10 john-kurkowski

Hey really sorry for the lack of reply on this, been really busy at work!!! I will pull together an example in the next few days to post. Sorry for the delay - and thanks for the quick reply!

llexical avatar Oct 13 '14 10:10 llexical