Files
bsky-social-app/patches/expo-image-picker@17.0.11.patch
T
Samuel Newman ff731849b0 Migrate from Yarn 1 to pnpm (#10465)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Eric Bailey <git@esb.lol>
2026-05-18 09:51:04 -07:00

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)