Check the MIME Type of the file at server. If it is "Application/pdf", save
the file, else send an error message.
How to check the Mime Type? It depends on which server-side scripting are
you using.
Majid
----- Original Message -----
From: "payam." <torkian@c...>
To: "JavaScript HowTo" <javascript_howto@p...>
Sent: Thursday, February 20, 2003 12:49 PM
Subject: [javascript_howto] finding the type of the file, uploaded
> Hello
> I have a form for uploading PDF files(just PDF files) to a server.
> My question is that can I find up that is the file uploaded really a PDF
> file before uploading it up to my server?:
> (I mean it may be a DOC file with a changed suffix)
>
> <form enctype="multipart/form-data" method=post>
> <input type=file>
> <form>
>
> thanks
> payam,
>
>
>