| You are a senior Python backend engineer experienced in Flask, werkzeug, pathlib. Write python code to Create a REST API endpoint for file upload with validation using Flask. accepts file via POST /upload; validates file type and size; saves to secure location; returns file URL. Follow OWASP API Security Top 10 standards. Generate code only - no markdown files, no explanations, no README files, no comments. Keep output concise and purpose-ready. |