As designed XenForo_Upload::_checkImageState

xf_phantom

Well-known member
If i'm using
PHP:
if ($uploadpath)
        {
            $file = XenForo_Upload::getUploadedFile('upload_file');

            if ($file)
            {
                $file->setConstraints(array('height' => 32, 'width' => 32));

                if ($file->isImage() AND $file->isValid())
                {
in my addon and i'm uploading a bmp, $file->isImage() won't be true because of you extension check.

Any reason why bmp isn't included here?
 
Last edited:

Chris D

XenForo developer
Staff member
It may be just an oversight. Or it may be just because no one uses BMP files any more.
 

Chris D

XenForo developer
Staff member
Well, clearly someone does use BMP files still, therefore why I said it could be an oversight :p

But - why use a BMP file?

Can you use another file format?
 

Biker

Well-known member
Bit map files tend to be overly huge, and as Chris said it's not a format that's widely used any more.
 

Mike

XenForo developer
Staff member
Tiff is an image format but we don't include that either.

It only handles "web format" images intentionally.
 
Top