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

Storage: generate_signed_url API documentation misleading for response_type/disposition #7696

Closed
lrowe opened this issue Apr 11, 2019 · 0 comments · Fixed by #8942
Closed
Assignees
Labels
api: storage Issues related to the Cloud Storage API. type: docs Improvement to the documentation for an API.

Comments

@lrowe
Copy link

lrowe commented Apr 11, 2019

Blob.generate_signed_url response_type and response_disposition parameters do not over-ride stored content_type as documented. The signed URL's response-content-type query string parameter is ignored if content-type is set on object metadata.

The generate_signed_url API documentation states (source):

        :type response_disposition: str
        :param response_disposition: (Optional) Content disposition of
                                     responses to requests for the signed URL.
                                     For example, to enable the signed URL
                                     to initiate a file of ``blog.png``, use
                                     the value
                                     ``'attachment; filename=blob.png'``.
        :type response_type: str
        :param response_type: (Optional) Content type of responses to requests
                              for the signed URL. Used to over-ride the content
                              type of the underlying blob/object.

However as documented in Signed URL Considerations:

Query String Parameters like response-content-disposition and response-content-type are not verified by the signature. To force a Content-Disposition or Content-Type in the response, set those parameters in the object metadata.

(Documentation issue confirmed in Google Cloud Support case 19006315.)

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Apr 12, 2019
@sduskis sduskis added api: storage Issues related to the Cloud Storage API. type: docs Improvement to the documentation for an API. and removed triage me I really want to be triaged. labels Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. type: docs Improvement to the documentation for an API.
Projects
None yet
4 participants