-
Notifications
You must be signed in to change notification settings - Fork 226
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
How to stop createBlockBlobFromStream while it is uploading #317
Comments
@georgesmarkus Sorry for that, there is no API to cancel uploading directly. But for every blobService object, we can create a filter and can stop the uploading in the filter. The filter will be executed before and after every time a request in the stream performs. Please refer to the following link about creating a custom filter: After creating a filter, pass the filter to the blobService object with
|
@XiaoningLiu filter I see your work-around using a filter but could not get it to work for me. I upload a large queue of files (varying sizes). A much simper solution would be a return handle/object with an abort method. Is this at least on the roadmap? |
I second this request. It'd be very helpful to be able to cancel in-progress uploads. Perhaps a filter could be provided that has a Or can anyone provide a simple example of a cancel-able filter? |
Here's my attempt at a filter that lets you cancel an in-progress upload. This is certainly not perfect, but appears to work in my rudimentary testing. I'd love to get feedback from people actually familiar with this. Is this the right way to cancel, i.e. just I haven't tested it with any other filters applied, e.g. a retry filter. Also it assumes you only ever have one upload: it doesn't reset its state or expect multiple uploads.
You would use it when creating the blob service like this:
Then if you have an upload in progress you cancel it like so:
|
Hi,
I started to use the Azure storage client library, the question is, and I am now using createBlockBlobFromStream to upload large files.
The question is: The user may be willing to cancel a file at any time while uploading, is there a way to cancel the file from being uploaded, in other words, to abort createBlockBlobFromStream background execution
Regards
The text was updated successfully, but these errors were encountered: