exam questions

Exam Associate Cloud Engineer All Questions

View all questions & answers for the Associate Cloud Engineer exam

Exam Associate Cloud Engineer topic 1 question 48 discussion

Actual exam question from Google's Associate Cloud Engineer
Question #: 48
Topic #: 1
[All Associate Cloud Engineer Questions]

You host a static website on Cloud Storage. Recently, you began to include links to PDF files on this site. Currently, when users click on the links to these PDF files, their browsers prompt them to save the file onto their local system. Instead, you want the clicked PDF files to be displayed within the browser window directly, without prompting the user to save the file locally. 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.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Buruguduystunstugudunstuy
Highly Voted 1 year, 6 months ago
Selected Answer: C
ANSWER A, enabling Cloud CDN on the website frontend, is not relevant to displaying PDF files in the browser. Cloud CDN is a content delivery network that caches content at edge locations around the world to reduce latency and improve website performance. ANSWER B, enabling "Share publicly" on the PDF file objects, only controls whether or not the files are accessible to users without authentication. It does not affect how the files are displayed in the browser. ANSWER D, adding a label to the storage bucket with a key of Content-Type and value of application/pdf, is not the correct way to set the Content-Type metadata for individual objects. Labels are used for organizing resources, while metadata is used to provide information about the data itself. Therefore, ANSWER C, setting Content-Type metadata to application/pdf on the PDF file objects, is the correct answer.
upvoted 41 times
dnur
1 year, 5 months ago
Many thanks for clear explanations! :)
upvoted 2 times
...
...
berezinsn
Highly Voted 4 years, 3 months ago
C is correct
upvoted 25 times
...
Dinya_jui
Most Recent 8 months ago
C makes much sense out of the remaining
upvoted 1 times
...
Captain1212
1 year ago
Selected Answer: C
answer is c , as other are not relevant
upvoted 1 times
...
YomanB
1 year ago
C. Set Content-Type metadata to application/pdf on the PDF file objects. Explanation: The Content-Type metadata indicates the media type of the content and helps the browser understand how to handle the file. In this case, by setting the Content-Type metadata of the PDF files to "application/pdf," you're informing the browser that the files are in PDF format, and the browser will attempt to display them directly within the browser window, rather than prompting the user to download them.
upvoted 7 times
...
Nxt_007
1 year, 1 month ago
Selected Answer: C
C is correct Setting the Content-Type metadata to application/pdf on the PDF file objects instructs the web browser to treat these files as PDF documents and display them inline, rather than prompting the user to download them.
upvoted 1 times
...
Paulo_Jorge
1 year, 8 months ago
Option C: To display PDF files directly within the browser window on a website hosted on Cloud Storage, you can follow these steps: In the Google Cloud Console, navigate to the Cloud Storage section and select the "Buckets" page. Select the bucket that contains the static website and the PDF files. From the "Actions" menu, select "Edit bucket" and then go to the "Website" tab. In the "Website Configuration" section, select the "Serve objects with this content type" option and enter "application/pdf" in the text field. This will cause PDF files to be served with the correct content type. Save the changes to the bucket configuration. After completing these steps, the PDF files on your website will be served with the correct content type and will be displayed directly within the browser window when clicked, without prompting the user to save the file locally.
upvoted 13 times
...
leogor
1 year, 10 months ago
Selected Answer: C
C. Set Content-Type metadata to application/pdf
upvoted 1 times
...
Untamables
1 year, 10 months ago
Selected Answer: C
FYI Importance of setting the correct MIME type https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_Types#importance_of_setting_the_correct_mime_type
upvoted 1 times
...
AzureDP900
2 years, 2 months ago
C is correct. Edit the PDF objects in Cloud Storage and reconfigure their Content-Type metadata into application/pdf.
upvoted 3 times
...
BBB_ACE
2 years, 3 months ago
Selected Answer: C
Ans: C
upvoted 2 times
...
PLUTONIUM54
2 years, 7 months ago
C IS CORRECT
upvoted 1 times
...
vishnukumartr
2 years, 9 months ago
C. Set Content-Type metadata to application/pdf on the PDF file objects.
upvoted 1 times
...
Jaira1256
2 years, 9 months ago
Ans - C
upvoted 1 times
...
sunilw
3 years, 2 months ago
C is correct. https://cloud.google.com/storage/docs/metadata#content-type
upvoted 11 times
...
vmart
3 years, 2 months ago
c is correct
upvoted 1 times
...
[Removed]
3 years, 5 months ago
C is correct. Set Content-Type metadata to application/pdf on the PDF file objects.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago