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

Cancel uploads #19

Merged
merged 5 commits into from
Dec 4, 2017
Merged

Cancel uploads #19

merged 5 commits into from
Dec 4, 2017

Conversation

ox-michaelradionov
Copy link
Contributor

@ox-michaelradionov ox-michaelradionov commented Mar 10, 2017

Adds a method for cancelling active upload by upload ID.
Fires an event "cancelled" with ID of the cancelled upload.
Method returns a promise with boolean whether cancel was executed successfully or not.

I've changed a bit how customUploadId is handled on Android, BinaryUploadRequest from android-upload-service also accepts a custom ID for upload. (http://gotev.github.io/android-upload-service/javadoc/) , constructors:

BinaryUploadRequest(Context context, String serverUrl)
BinaryUploadRequest(Context context, String uploadId, String serverUrl)

so in order to be able to cancel an upload by id, android-upload-service should also be aware of this id. I am using second constructor definition to pass a custom id to the service.

@ox-michaelradionov ox-michaelradionov changed the title Cancel uploads WIP: Cancel uploads Mar 10, 2017
@StevePotter
Copy link
Contributor

@ox-michaelradionov any progress on this one?

@ox-michaelradionov
Copy link
Contributor Author

@StevePotter Sorry, I completely forgot about this one. I'll be back to my mobile apps in the nearest week, so I'll be able to check if everything works as intended in this PR. Thank you for reminding me about it.
I've noticed that you've migrated to RN 0.40+, but I am still on 0.39 so I won't be able to test in on 0.40+.

@StevePotter
Copy link
Contributor

StevePotter commented Apr 27, 2017 via email

@ox-michaelradionov
Copy link
Contributor Author

Ok, I am fine with that, thank you.

@ox-michaelradionov ox-michaelradionov changed the title WIP: Cancel uploads Cancel uploads Jul 6, 2017
@ox-michaelradionov
Copy link
Contributor Author

I've resolved all the conflicts and tested it against the latest version of the package. Works great for me.

@sampurcell93
Copy link

Is there any update to this? Would love to have support for cancellations.

@EJohnF EJohnF mentioned this pull request Nov 30, 2017
@TSMMark TSMMark merged commit 0b6bbd3 into Vydia:master Dec 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants