🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Secure File Uploads: all 10 questions

Quiz: Secure File Uploads · Question 6 of 10

Why should an uploaded file be saved under a new random name?

Why should an uploaded file be saved under a new random name?

  1. A.Random names compress better
  2. B.It prevents path traversal, overwriting other files and guessing file locations
  3. C.Browsers require random names
  4. D.It makes the file load faster
Answer & explanation

Correct answer: It prevents path traversal, overwriting other files and guessing file locations

The user's file name is kept only as data in the database.

Can you get the rest right without peeking?

Take the timed Quiz: Secure File Uploads quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →