
Explanation:
The correct answer is B because the browser requires the correct content-type to interpret and render the file properly. The content-type should be set to application/pdf on the object metadata, not the bucket. This ensures the PDF opens in the browser as intended.
application/octet-stream is a generic binary data type, not specific to PDFs.For more details, refer to the GCP documentation on Cloud Storage Object Metadata.
Ultimate access to all questions.
No comments yet.
Your company hosts a static website on Cloud Storage. After adding PDF files, users find that clicking a PDF link downloads the file instead of opening it in the browser. What change would you implement to resolve this issue?
A
Set the content-type as object metadata to application/octet-stream on the bucket
B
Set the content-type as object metadata to application/pdf on the files
C
Set the content-type as object metadata to application/octet-stream on the files
D
Set the content-type as object metadata to application/pdf on the bucket