Closed damz closed 4 years ago
Expose
.CloseWithError
onObjectCreateFile
to allow uploads to be aborted.
That looks great... I'll merge that now.
Ideally, we would add this to
DynamicLargeObjectCreate
andStaticLargeObjectCreate
but because of the support for seeking it looks like it gets complicated very quickly. I am happy to help do that, but I would need guidance on the best way to do it, and I would rather do that in a separate PR.
Its been a while since I looked at that code!
It occurs to me that a context.Context is probably the proper tool for the job. However the swift lib was written a long time before context was a thing so it would require a whole new set of interfaces and be a lot of work to retro-fit.
Any other ideas?
The Google Storage implementation asks you to provide a context when creating the writer. It is a pain the neck to use, because you can only control the overall operation, not each writes. It also exposes the CloseWithError
method which I replicated here.
The Google Storage implementation asks you to provide a context when creating the writer. It is a pain the neck to use, because you can only control the overall operation, not each writes. It also exposes the
CloseWithError
method which I replicated here.
I see.
I'd be open to either or both if you wanted to send a PR...
Expose
.CloseWithError
onObjectCreateFile
to allow uploads to be aborted.Ideally, we would add this to
DynamicLargeObjectCreate
andStaticLargeObjectCreate
but because of the support for seeking it looks like it gets complicated very quickly. I am happy to help do that, but I would need guidance on the best way to do it, and I would rather do that in a separate PR.