PHP-dataURI icon indicating copy to clipboard operation
PHP-dataURI copied to clipboard

Invalid getMimeType for audio/mp3

Open renjithspace opened this issue 5 years ago • 1 comments

Code


use DataURI\Parser;

$audio = Parser::parse('data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAA');
$mime = $audio->getMimeType();
echo $mime;

Expected

audio/mp3

Output

audio/mp

renjithspace avatar Dec 23 '19 11:12 renjithspace

Totally the same for the video/mp4 case. The problem is inside the regexp pattern.

nevmerzhitsky avatar Feb 20 '23 18:02 nevmerzhitsky