Skip to content

Commit

Permalink
Fixes #1228 - Failing attachment uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanceriu committed Jun 30, 2023
1 parent ccd4101 commit f91405e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ struct DocumentPicker: UIViewControllerRepresentable {
}

do {
let _ = url.startAccessingSecurityScopedResource()
let newURL = try FileManager.default.copyFileToTemporaryDirectory(file: url)
url.stopAccessingSecurityScopedResource()
documentPicker.callback(.selectFile(newURL))
} catch {
documentPicker.callback(.error(error))
Expand Down

0 comments on commit f91405e

Please sign in to comment.