Wildhoney / EmberDroplet

Ember.js HTML5 file uploading with drag & drop and image/file preview.
http://ember-droplet.herokuapp.com/
MIT License
197 stars 31 forks source link

Action returning promise #55

Open llexical opened 10 years ago

llexical commented 10 years ago

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.

Wildhoney commented 10 years ago

Could you please post an example?

john-kurkowski commented 10 years ago

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.

llexical commented 10 years ago

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!