Question · Vibe coding with Claude Code course · Module 14: Pinterest clone

Quiz: Checking the file type

Why does the server check the photo type by its first bytes, when the file field has the accept attribute?

Answer options

  • Because accept works only in Chrome
  • Because the first bytes say how many pixels the photo has
  • Because the browser checks accept only after the file is sent
  • Because accept is only a hint for the picker window, and a request can be sent with any file and any type

You can check the correct answer by solving this task in the CodeWorlds game.