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

v1.4.6 #25

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/src/utils/path_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ String getFileExtension({
required String contentType,
bool withExtensionDot = true,
}) {
String ext = path.extension(name);
String ext = getFileExtensionFromFileName(fileName: name);

if (ext.isNotEmpty) {
if (withExtensionDot) {
Expand All @@ -88,6 +88,10 @@ String getFileExtension({
}
}

String getFileExtensionFromFileName({required String fileName}) {
return path.extension(fileName);
}

String getFileTypeFromMime({required String contentType}) {
return contentType.substring(contentType.lastIndexOf('/') + 1);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ardrive_io
description: A new Flutter package project.
version: 1.4.5
version: 1.4.6
homepage:
publish_to: none

Expand Down
Loading