You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using saveAs to save file of MimeType.other on iOS the created file has repeated extension eg. test.xyz.xyz. This behaviour is a result of extension being appended to file name twice:
First in dart code (file_saver.dart):
It seems appending extension in the swift code has been introduced to resolve the issue #20.
I believe the correct solution would be to append extension only in the platform code for both android and iOS (alternatively it could be always added on the dart side but I haven't looked into the implications for saveFile method and other platforms). Currently for mime types different than other extension is never added on the android. It seems it's not strictly necessary because android adds appropriate extension based on the mimeType. However I think extension should be included in the EXTRA_TITLE argument as seen in the example here https://developer.android.com/training/data-storage/shared/documents-files#create-file.
The text was updated successfully, but these errors were encountered:
When using
saveAs
to save file ofMimeType.other
on iOS the created file has repeated extension eg. test.xyz.xyz. This behaviour is a result of extension being appended to file name twice:First in dart code (file_saver.dart):
Second in native code (Dialog.swift):
It seems appending extension in the swift code has been introduced to resolve the issue #20.
I believe the correct solution would be to append extension only in the platform code for both android and iOS (alternatively it could be always added on the dart side but I haven't looked into the implications for
saveFile
method and other platforms). Currently for mime types different than other extension is never added on the android. It seems it's not strictly necessary because android adds appropriate extension based on themimeType
. However I think extension should be included in theEXTRA_TITLE
argument as seen in the example here https://developer.android.com/training/data-storage/shared/documents-files#create-file.The text was updated successfully, but these errors were encountered: