D. The folder name 'image' is likely incorrect; should be 'images'
Solution
Step 1: Check folder name consistency
The route suggests images are in 'images' folder, but code uses 'image' (singular), likely a typo causing file not found.
Step 2: Verify other parts
Imports and route syntax are correct; function name is valid in Python.
Final Answer:
The folder name 'image' is likely incorrect; should be 'images' -> Option D
Quick Check:
Folder name mismatch causes errors = C [OK]
Hint: Check folder names carefully for typos [OK]
Common Mistakes:
Assuming function names must be special
Thinking route syntax is wrong
Ignoring folder name typos
5. You want to serve user-uploaded images stored in a folder outside your Flask app directory called /var/www/uploads. Which is the best way to serve these images securely?
hard
A. Directly link to the folder path in HTML without a Flask route
B. Copy images into the app's static folder and serve from there
C. Use send_from_directory('/var/www/uploads', filename) in a route with filename validation