Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postUpload and postPersist fired per chunk #20

Closed
mitom opened this issue Jun 19, 2013 · 2 comments
Closed

postUpload and postPersist fired per chunk #20

mitom opened this issue Jun 19, 2013 · 2 comments
Assignees
Labels

Comments

@mitom
Copy link
Contributor

mitom commented Jun 19, 2013

Is there a way to tell in the event if it is fired for the reassembled file or for a chunk?
(using blueimp as frontend)

Thanks.

@sheeep
Copy link
Contributor

sheeep commented Jun 19, 2013

Currently not, I'm afraid. It would make sense to not fire the postUpload and postPersist event until the file is finished and uploaded though. Actually the best way imo would be to introduce one more event postUploadChunk which will be dispatched after a chunk has been uploaded. (Also because its pointless to fire the postPersist event if the uploaded file is a chunk. It won't use the Orphanage anyway.)

I'll have a look. Thanks for pointing this out.

@ghost ghost assigned sheeep Jun 19, 2013
sheeep added a commit that referenced this issue Jun 20, 2013
* Moved dispatching to the upload* functions
* Added a new Event which will be fired after a chunk has been uploaded

This is a huge BC-break. It has to be done to address #20 though.
@sheeep
Copy link
Contributor

sheeep commented Jun 20, 2013

Hey @mitom

Take a look at a408548. I've changed not only the way the events get dispatched but also introduced a new POST_CHUNK_UPLOAD event you can listen to. It will be fired as soon as a chunk gets uploaded. After the chunks are assembled, a standard POST_UPLOAD event is dispatched.

Be sure to update to tag v0.9.5. If you have any further question, don't hesitate to comment here. :)

@sheeep sheeep closed this as completed Jun 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants