Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid getMimeType for audio/mp3 #21

Open
renjithspace opened this issue Dec 23, 2019 · 1 comment · May be fixed by #24
Open

Invalid getMimeType for audio/mp3 #21

renjithspace opened this issue Dec 23, 2019 · 1 comment · May be fixed by #24

Comments

@renjithspace
Copy link

renjithspace commented Dec 23, 2019

Code

use DataURI\Parser;

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

Expected

audio/mp3

Output

audio/mp
@nevmerzhitsky
Copy link

nevmerzhitsky commented Feb 20, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants