Receiving images with mimetype application/octet-stream
Hi guys,
I have a new challenge. So I am receiving images from a mobile app. On some android devices when it is uploaded from the camera directly, I get the mimetype application/octet-stream.
This mimetype can basically be anything.
I read on stackoverflow that "getimagesize" is a reasonable safe way to determine if the uploaded file is really an image.
But somehow this "feels wrong". Has anyone stumbled upon a similiar issue?
@ChristophAust A trick would be to use dimensions validation.. It is the same as your own first post, but you let laravel handle it for you
https://laravel.com/docs/8.x/validation#rule-dimensions
If the file has no dimensions or isnt an image file, it will fail the validation automatically
Please or to participate in this conversation.