
Answer-first summary for fast verification
Answer: Set Content-Type metadata to application/pdf on the PDF file objects.
The correct option is C. Setting the Content-Type metadata to application/pdf on the PDF file objects informs the browser that the files are in PDF format. This ensures that when users click on a PDF link, the file is displayed within the browser window directly, rather than prompting them to download it.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You host a static website on Google Cloud Storage and have recently added links to PDF files on the site. Currently, when users click on these PDF links, their browsers prompt them to save the files to their local systems. You prefer that, when users click on these PDF links, the files display directly within the browser window instead of prompting a download. What should you do?
A
Enable Cloud CDN on the website frontend.
B
Enable 'Share publicly' on the PDF file objects.
C
Set Content-Type metadata to application/pdf on the PDF file objects.
D
Add a label to the storage bucket with a key of Content-Type and value of application/pdf.
No comments yet.