Skip to content

Commit

Permalink
Merge pull request #25 from ardriveapp/PE-5529-txt-file-extension-cha…
Browse files Browse the repository at this point in the history
…nges-incorrectly-in-edit-modal

v1.4.6
  • Loading branch information
thiagocarvalhodev authored Jan 30, 2024
2 parents 286d636 + 05c6411 commit 93bc5bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit 93bc5bb

Please sign in to comment.