R

Ravina • 3.96K Points
Extraordinary

Q. Which response class should be used to return an image in FastAPI?

  • (A) ImageResponse
  • (B) FileResponse
  • (C) HTMLResponse
  • (D) JSONResponse
  • Correct Answer - Option(B)
  • Views: 31
  • Filed under category Fast API
  • Hashtags:

Explanation by: Ravina

`FileResponse` is used to serve files like images or PDFs in FastAPI.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.