Drag file from app to Finder on macOS

Is it possible under macOS to drag a file from an app into the Finder? 

For example, I want to drag a CSV file from the app to the Finder, but the following code does not work.

static var transferRepresentation: some TransferRepresentation {
        FileRepresentation(exportedContentType: .commaSeparatedText) {_ in
            SentTransferredFile(Bundle.main.url(forResource: "Demo", withExtension: "csv")!)
        }
}

And I changed the exportedContentType to ".fileUrl", ".url" and ".data" but the code still does not work.