You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like it, I tried various filetypes the outputs were different. I even tried to fool your script and change the extension of an EXE file to a PNG file, and $r['fileinfo'] still returned "EXE (MZ: DOS / Windows)".
I'm having problems when I read from multiple [type="file"] inputs. I had to split $r['mimeinfo'] to just return the mimetype:
It says the first file (presumably) because of having [$key] is invalid, even though when I tested it as a single file upload validating as an image, it came back valid.
if ( $mimeType !== 'image/jpeg' || $mimeType !== 'image/png' ) {
// I've tried != and && in various combinations, still detects a real png image invalid.
print( json_encode( array( 'status' => 'danger', 'alertMsg' => $_FILES[ 'uploadimg' ][ 'name' ][ $key ] . ' is not a true image', 'code' => 0 ) ) );
exit();
}
And yes, I have this in a foreach() loop, the first thing I'm doing is making sure if the file is a PNG/JPEG/JPG, your script is "the nosy sibling" asking "Are you really?"
The text was updated successfully, but these errors were encountered:
I like it, I tried various filetypes the outputs were different. I even tried to fool your script and change the extension of an EXE file to a PNG file, and $r['fileinfo'] still returned "EXE (MZ: DOS / Windows)".
I'm having problems when I read from multiple [type="file"] inputs. I had to split $r['mimeinfo'] to just return the mimetype:
It says the first file (presumably) because of having [$key] is invalid, even though when I tested it as a single file upload validating as an image, it came back valid.
And yes, I have this in a foreach() loop, the first thing I'm doing is making sure if the file is a PNG/JPEG/JPG, your script is "the nosy sibling" asking "Are you really?"
The text was updated successfully, but these errors were encountered: