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

Blob type always null #84

Open
AlexanderMendivil opened this issue Feb 23, 2023 · 2 comments
Open

Blob type always null #84

AlexanderMendivil opened this issue Feb 23, 2023 · 2 comments

Comments

@AlexanderMendivil
Copy link

I've noticed that there is no a return type in the default_extension_map.dart for blob files, therefore I'm always getting null while bringing a blob file to lookupMimeType

@AlexanderMendivil AlexanderMendivil changed the title Blobl type always null Blob type always null Feb 23, 2023
@ollyde
Copy link

ollyde commented May 19, 2023

Did you find a solution for this, I also see the same error.

@AlexanderMendivil
Copy link
Author

I did a workaround for it, I just returned the extension and then adding the right type as the library does, I did it this way because I knew I will always have images

final parts = preSignedUrl.split('?');
final extension = parts[parts.length - 2].split(".").last.toLowerCase();
if(extension.contains('blob')){
return extension;
}
return lookupMimeType(extension);

I haven't move my code since I did it, not sure if the library got updates

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

No branches or pull requests

2 participants