From 9e43c831ed30c0a2985bc6288c8ae3a4ef4f290d Mon Sep 17 00:00:00 2001 From: Thiago Carvalho Date: Mon, 29 Jan 2024 20:05:18 -0300 Subject: [PATCH 1/2] Update path_utils.dart - add a method for get file extension --- lib/src/utils/path_utils.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); } From 05c6411ea17abebb357a0d91db20da577b4ffcf9 Mon Sep 17 00:00:00 2001 From: Thiago Carvalho Date: Tue, 30 Jan 2024 14:34:10 -0300 Subject: [PATCH 2/2] Update pubspec.yaml --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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