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.)
Blob.generate_signed_urlresponse_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):
However as documented in Signed URL Considerations:
(Documentation issue confirmed in Google Cloud Support case 19006315.)