R

Ravina • 3.96K Points
Extraordinary

Q. What does `File(..., media_type='image/png')` specify?

  • (A) Only PNG files are allowed
  • (B) Adds description for the API docs
  • (C) Sets the expected content type in API docs
  • (D) Limits the file size
  • Correct Answer - Option(C)
  • Views: 17
  • Filed under category Fast API
  • Hashtags:

Explanation by: Ravina
It sets the expected content type in the generated OpenAPI schema.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.