ShareLink for multiple items always says x images, regardless of type

36 Views Asked by At

I have a ShareLink working for multiple items just fine, but with one small issue: no matter the type of file I'm sharing, it comes up with x images, even if sharing a recording. The SharePreview works fine for a single item, but the text part enter image description hereseems to be being ignored for multiple.

The code is as follows for the ShareLink:

ShareLink(items: selectedRecordings, preview: { _ in
                SharePreview("Recording", image: Image("Logo"))
            }) {
                Image(systemName: "square.and.arrow.up")
                    .imageScale(.large)
            }

And the FileTransferRepresentation is:

 public static var transferRepresentation: some TransferRepresentation {
        FileRepresentation(exportedContentType: .wav) { audio in
            SentTransferredFile(URL(string: "\(FileHelper.getDocumentsDirectory())\(audio.url)")!)
        }
    }
0

There are 0 best solutions below