You are here: Re: php upload form with renaming/unique directory capabilities... « PHP Programming Language « IT news, forums, messages
Re: php upload form with renaming/unique directory capabilities...

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация