瀏覽代碼

fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 年之前
父節點
當前提交
b7c7aa4be3
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9 1
      iOSClient/Main/Create cloud/NCUploadAssets.swift

+ 9 - 1
iOSClient/Main/Create cloud/NCUploadAssets.swift

@@ -266,7 +266,15 @@ struct UploadAssetsView: View {
 
     func presentedQuickLook(index: Int) {
 
-        if let image = uploadAssets.previewStore[index].asset.fullResolutionImage {
+        var image: UIImage?
+
+        if let imageData = uploadAssets.previewStore[index].data {
+            image = UIImage(data: imageData)
+        } else if let imageFullResolution = uploadAssets.previewStore[index].asset.fullResolutionImage {
+            image = imageFullResolution
+        }
+
+        if let image = image {
             if let data = image.pngData() {
                 do {
                     try data.write(to: URL(fileURLWithPath: fileNamePath))