You are here: Re: [PHP] filtering uploaded files « PHP « IT news, forums, messages
Re: [PHP] filtering uploaded files

Posted by Marek Kilimajer on 03/29/05 21:21

Cima wrote:
> hi,
>
> id like to know if there is a way to filter or specify what type of files id like uploaded to my server. for example, if i make a form to upload image files, when i click browse there are 2 fields one that'll store the file name(of the file selected) and the other filetype (usually say all types) what id like is to specify in file type : *.jpg,*gif etc. is this possible?
>
> thanx.

You can use accept atribute of <form> element. I'm not sure why it's a
form atribute, if it was part <input type="file"> would be better. But I
don't know of any browser respecting this.

accept = content-type-list [CI]
This attribute specifies a comma-separated list of content types
that a server processing this form will handle correctly. User agents
may use this information to filter out non-conforming files when
prompting a user to select files to be sent to the server (cf. the INPUT
element when type="file").

 

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

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