ff731849b0
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Eric Bailey <git@esb.lol>
30 lines
1.5 KiB
Diff
30 lines
1.5 KiB
Diff
diff --git a/ios/MediaHandler.swift b/ios/MediaHandler.swift
|
|
index 6e4fbe1b3921173a1cc4e6eff626b0749e8bab14..e334abb680a8965acb1f6bbdfbc1325ad35edf3a 100644
|
|
--- a/ios/MediaHandler.swift
|
|
+++ b/ios/MediaHandler.swift
|
|
@@ -310,10 +310,12 @@ internal struct MediaHandler {
|
|
let fileExtension = getFileExtension(from: originalFilename)
|
|
let destinationUrl = try generateUrl(withFileExtension: fileExtension)
|
|
|
|
+ let resourceOptions = PHAssetResourceRequestOptions()
|
|
+ resourceOptions.isNetworkAccessAllowed = true
|
|
try await PHAssetResourceManager.default().writeData(
|
|
for: resource,
|
|
toFile: destinationUrl,
|
|
- options: nil
|
|
+ options: resourceOptions
|
|
)
|
|
|
|
let mimeType = getMimeType(from: destinationUrl.pathExtension)
|
|
@@ -389,7 +391,9 @@ internal struct MediaHandler {
|
|
|
|
// Stream the resource into our cache directory. This API is asynchronous but doesn't require
|
|
// a temporary file like `loadFileRepresentation`.
|
|
- try await PHAssetResourceManager.default().writeData(for: resource, toFile: destinationUrl, options: nil)
|
|
+ let resourceOptions = PHAssetResourceRequestOptions()
|
|
+ resourceOptions.isNetworkAccessAllowed = true
|
|
+ try await PHAssetResourceManager.default().writeData(for: resource, toFile: destinationUrl, options: resourceOptions)
|
|
|
|
// Build and return the result using the helper.
|
|
let mimeType = getMimeType(from: destinationUrl.pathExtension)
|