A file named PDF still needs its contents checked
A form lets someone attach a quotation. They select a file and the website receives it. That is only the first step: the document name does not prove that its contents match expectations, or that it is safe to open or publish. If an automated task will process it next, validation needs to happen first.
Define what you need to receive
Start with a short list of accepted formats based on the job. If you only need a PDF document, there is no reason to accept every extension. Explain the size limit before uploading too. This information helps the person, but checks must run on the server: a browser restriction is not a security boundary.
OWASP recommends combining controls. The extension, declared MIME type and file signature provide different clues. The Content-Type comes from the client and can be spoofed; do not use it as the only evidence. A valid signature alone does not guarantee that all the contents are safe either.
Separate receipt, checking and use
One practical approach is to store the attachment in a non-public area first, with an identifier generated by the application. Keep the original name only as data when needed, not as an instruction about where to write. Define who can retrieve the file and for how long.
Then apply validation and, where appropriate, antivirus scanning or content reconstruction. Do not send private documents to external scanning services without checking their terms and the relevant permission. Only accepted files should move into the intended process. Rejected or pending does not mean processed.
Test the failure path too
In a test environment, check a valid file, an unsupported format, an oversized upload and a damaged document. Confirm that the message explains what the person can do and that rejected attachments never become public or reach the next task.
No single filter solves every upload risk. The useful result is a chain of controls suited to the risk, with clear states and no confusion between receiving an attachment and validating it.