Reply to Re: mime types

Your name:

Reply:


Posted by shimmyshack on 02/20/07 19:52

On Feb 20, 6:31 pm, bill <n...@noreturn.f9.co.uk> wrote:
> bill wrote:
> > Can anyone help. I am using the following code to check that jpg image
> > only can be uploaded
>
> > if ($_FILES['userfile']['type'] != 'image/jpeg')
> > {
> > $msg = 'Problem: file is not jpg';
> > }
>
> > when uploading a jpg or jpeg this works fine in firefox but when i try
> > to upload a jpg using internet explorer an error is produced saying that
> > it is not a jpg when in fact it is.
> > Can anyone help
> > Thanks
> > bill
>
> checked the file type and IE said it was uploading. It said it was
> image/pjpeg. But it was a jpg.
> put that type into the array and the file uploaded ok.
> To install fiddler i need to install net 1.1. I run apache and will not
> use windows rubbish.
> Thanks for your time.

bill there are other proxies not made by Microsoft Employees, however
Eric is a very helpful guy, and he has indicated that it is difficult
for him to manoeuvre within the confines of Microsoft legal, and so
the tool remains free, and as open as possible - in fact you can code
within in using .NET (which incidentally is a cross platform
technology thanks to Novell and Mono) so you are free to extend
fiddler as you like, while the support comes from Eric should you need
it, not from Microsoft.

As for your actual problem, I am still a little bit surprised you
haven't taken the point: that a mimetype is little more than a string
of text sent by the browser, it doesnt mean it _is_ a jpeg - oh that
life were that simple.
I obviously don't want to beat you over the head with this, but you
are on a journey of discovery and why not just take the advice of the
newsgroup you post on. Steve and I are looking out for you. If you
want to allow image uploads, then make sure they are images, after all
if you receive a brown box with "this is your cd from amazon" you dont
get happy 'til you've opened it, checked its not broken, played it and
it is what you paid for.

Who told you in the first place that mimetype checking was the way to
go, and why believe them over us, email me your url if you need proof,
I'll leave a helloworld.txt file in the doc root of your site. (white
hat)

[Back to original 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

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