← All tasks
🧮
Intermediate

Write Safe File Upload Extension Validation

⏱ 3 min ⭐ 90 XP 🔁 3 attempts allowed

What you'll do

Write the PHP expression that checks an uploaded file's extension against an allowlist of image types.

Scenario

An upload endpoint needs to reject anything that isn't a jpg, png, or gif before saving it.

Ready to try it?

Create a free account and subscribe to take "Write Safe File Upload Extension Validation". Earn 90 XP and track your internship progress.

Already have an account? Sign in