
Answer-first summary for fast verification
Answer: Set the content-type as object metadata to application/pdf on the files
The correct answer is **C** 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. Setting it to `application/octet-stream` (Option A) or on the bucket (Options B & D) would not solve the issue. For more details, refer to the GCP documentation on Cloud Storage Object Metadata, specifically the Content-Type section, which explains how the Content-Type metadata allows browsers to render the object correctly.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your company hosts a static website on Cloud Storage. After adding PDF files to the website, 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 files
B
Set the content-type as object metadata to application/pdf on the bucket
C
Set the content-type as object metadata to application/pdf on the files
D
Set the content-type as object metadata to application/octet-stream on the bucket
No comments yet.