Skip to content

iOS: ShareFiles --> Save to Files --> two documents are saved #34

@fabianbrandscheid

Description

@fabianbrandscheid

Hi,

I use the shareFiles method in a very simple example:

      final tempDir = await getTemporaryDirectory();
      final Uint8List fileContent = <someBytes>
      final targetPath =
          "${tempDir.path}${"/$fileNameForFile${h4uFileType.fileExtension}"}";

      File(targetPath).writeAsBytesSync(fileContent);

      await Share.shareFiles([targetPath], text: text, subject: subject);

When I share a pdf file on my iPhone and then select the iOS option "Save to Files" two documents are saved to the selected directory. One file is the expected pdf file and the other an empty document called "Text":
IMG_1455 2

Any help for this issue?
Thanks in advance!

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions