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:
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?
 
Tiff is an image format but we don't include that either.

It only handles "web format" images intentionally.
 
Back
Top Bottom