[ansel] File size error

Ryu ryu at ryux.org
Fri Oct 28 20:24:27 UTC 2011


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.horde.org/archives/ansel/attachments/20111028/ae75606c/attachment.bin>


More information about the ansel mailing list