Re: File size error

Ryu <[email protected]> Fri, 28 Oct 2011 22:24:27 +0200
Newsgroups gmane.comp.horde.ansel
Message-ID <2685271.aTSOsnTEEe@ryu>
Le vendredi 28 octobre 2011 10:26:46 Michael J Rubinsky a écrit :
> > 
> > But I have a new problem now...
> > Error is "Not a valid, supported image file"
> > 
> > If I check the type of the content, it is "application/octet-stream;
> > charset=UTF-8". (ansel/lib/View/Upload.php, line 270)
> 
> This simply means that your browser is streaming the upload file
> directly instead of posting it as a form field. This has nothing to do
> with the image file type. The code that checks the image file type is
> further down, around line 293.
> 
> > Even if I change this type to be handled (by replacing the string in
> > test), the function getimagesize seems to fail...
> 
> What type of file are you uploading? Do you have Mime Magic set up
> correctly? What is the value of type after line 294?

Well, I just check this line. But I never passed this code.
line 263 : if (empty($type) || $type == 'application/octet-stream') {
This is this test which failed because $type has for value "application/octet-
stream; charset=UTF-8"

I try to upload images with Firefox 7 on Windows and all is good. On a Fedora 
F14 with Firefox 3.6.23, this no ok... I think the problem is the 
charset=UTF-8 but I don't know why it is added to the HTTP_CONTENT_TYPE.

Ryu

PS: I updated to Ansel 2.0 RC2 but the original problem of 1mb limit is still 
present. With the patch, it is ok.

-- 
ansel mailing list - Join the hunt: http://horde.org/bounties/#ansel
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iEYEABECAAYFAk6rD30ACgkQOt7tMtf83xn9hACbB3fhK4c1cqTB34XO0iAhkdwi
etQAoMHaHQD1sF1LGjBndJtHO+Q/y7PS
=AARV
-----END PGP SIGNATURE-----