|
Posted by Roland Mueller on 11/29/07 22:40
Hello,
On 30 marras, 00:12, Truck Estevez <oohtr...@gmail.com> wrote:
> > > - only allow certain filetypes to be uploaded
>
> > Not possible to limit filetypes on upload using PHP. I don't think
> > javacript will either. The most you can hope for client-side is a coded
> > limit on extension. Even that is not trustworthy. On the server, you'll
> > have a hrad time checking validity of certain files too. You can filter on
> > extension again, that's not reliable though. The same goes for checking
> > mime-type. There are some tricks to check for certain files. We cannot
> > tell you unless you specify what types you want.
>
> thanks... the filetypes would be .ai, .eps, .pdf, .psd, and .tif. all
> image files.
on a Unix/Linux machine as server you probably could use the /usr/bin/
file command which provides a file type recognition based on byte
patterns in the begin of the file.
BR,
Roland
Navigation:
[Reply to this message]
|