-
Notifications
You must be signed in to change notification settings - Fork 370
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
No way to specify wildcard Origin on resumable upload initiate session #4902
Comments
I'll have a closer look at this when I get a chance, but it's not clear to me whether this is a client library issue or a Storage service issue. Are you able to capture the requests (from .NET) as well as the responses to see if we're sending the headers you expect to send? If the library is behaving as expected, we'll need to pass this over to the Storage team - I'm afraid the engineers working in this repo don't have in-depth knowledge of every API represented. But obviously if it is a client library issue, we should be able to fix that :) |
Okay, I'm still not entirely sure that I follow, but I'm reasonably sure this is a Storage feature request. It's not quite clear to me why for a given upload you'll have multiple origins though. It's also not clear to me what you mean by "sending the origin to the API" - do you mean that the browser sends its current origin to your API, so that your code can request an appropriate resumable upload to be started? To be honest, that feels entirely appropriate to me - not ugly at all. |
Well, I might have been a bit aggressive when I said ugly, I apologise for that. In my understanding, it seems a bit counterintuitive the fact that a wildcard isn't allowed. I understand that it promotes a way to hard specify an origin and maintain that, without the upload URI "wandering away". However, even if the wildcard isn't allowed, it still allows the upload. The error occurs after the upload is finished. It is the same that happens here
Yes, you are right. About my stack, I will simplify as much as possible. In terms of interactions, I have 3 layers:
To upload any file to be processed, the client consumes the API and get a Upload URI. Thus, the client performs the file upload (resumable and in chunks), avoiding any process overhead. Thank you for your comment, I appreciate any further instructions if this request must be done in somewhere else. |
I can't speak to the failure mode - but I strongly suspect that wildcards are regarded as an anti-pattern from a security perspective. (I would imagine it's relatively rare to decide you don't care what origin performs an upload - your current approach really does sound appropriate to me.) It does sound like this is a basically a service feature request - I would suggest using one of the avenues listed on the Storage Support page. Having looked at the code, I believe the client library is working correctly, and this is a matter of what's permitted by the service. |
Indeed. Can I request to point out on the documentation that a wildcard isn't allowed? |
I would prefer not to do that in the library documentation, as that means it would become inaccurate if the team accepts your feature request. I think it would be better to ask for the service team to update the service documentation if they don't want to implement the feature. |
(Closing this now as I believe there's no change required in terms of the library. Best of luck with your communications with the server team.) |
Following what was described in issue #2755. I would like to be able to add a wildcard to
UploadObjectOptions.Origin
; Just to describe, I don't know if it is a bug or a feature request.Environment details
My situations is that:
XmlHttpRequest
filesize limitation (around 80MB), it uploads in chunks of 8MB (similar from what Google Cloud Storage does when uploading directly to it).What is happening, is, on the last chunk, when the status received is
200
, I am getting the following error:On the API, I am creating the URI like this:
This is the response headers when the status is
308
:This is the last response that I get when the status is
200
, and the error happens:Take a look that the last response doesn't come with the header: access-control-allow-origin
This is the same behaviour if I don't set anything on
UploadObjectOptions.Origin
. However, if I set directlyhttp://localhost:8080
it works fine.This is my JavaScript code:
My problem is, I don't have only a single origin, I have multiple origins. Now, my workaround is sending the origin to the API in order to add the
Origin
. This is ugly.I would like to be able to accept any Origin using wildcards, as I defined on Set Bucket CORS.
If you need any further information, let me know.
The text was updated successfully, but these errors were encountered: