get the file in php in storage and get the mime type code example Example: php get file mime type echo mime_content_type("yourfile.gif"); //image/gif