diff --git a/lib/src/utils/path_utils.dart b/lib/src/utils/path_utils.dart index 601c648..5ec87af 100644 --- a/lib/src/utils/path_utils.dart +++ b/lib/src/utils/path_utils.dart @@ -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) { @@ -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); } diff --git a/pubspec.yaml b/pubspec.yaml index 81b5c2a..a4ab975 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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