Browse Source

fix

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 năm trước cách đây
mục cha
commit
b7c7aa4be3
1 tập tin đã thay đổi với 9 bổ sung1 xóa
  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))