marinofaggiana 4 年之前
父節點
當前提交
c32f9a4802
共有 1 個文件被更改,包括 5 次插入10 次删除
  1. 5 10
      iOSClient/Main/Colleaction Common/NCCollectionCommon.swift

+ 5 - 10
iOSClient/Main/Colleaction Common/NCCollectionCommon.swift

@@ -415,20 +415,15 @@ class NCCollectionCommon: NSObject, NCSelectDelegate {
     }
 
     func pastePasteboard(serverUrl: String) {
-        
-        var typeDataSaved = [String: Data]()
-        
+                
         for (index, items) in UIPasteboard.general.items.enumerated() {
             for item in items {
                 let contentType = item.key
                 if let data = UIPasteboard.general.data(forPasteboardType: contentType, inItemSet: IndexSet([index]))?.first {
-                    typeDataSaved[contentType] = data
-                }
-            }
-            for (contentType,data) in typeDataSaved {
-                let results = NCCommunicationCommon.shared.convertUTItoResultType(fileUTI: contentType as CFString)
-                if results.resultTypeFile != NCCommunicationCommon.typeFile.unknow.rawValue {
-                    uploadPasteFile(fileName: results.resultFilename, ext: results.resultExtension, contentType: contentType, serverUrl: serverUrl, data: data)
+                    let results = NCCommunicationCommon.shared.convertUTItoResultType(fileUTI: contentType as CFString)
+                    if results.resultTypeFile != NCCommunicationCommon.typeFile.unknow.rawValue {
+                        uploadPasteFile(fileName: results.resultFilename, ext: results.resultExtension, contentType: contentType, serverUrl: serverUrl, data: data)
+                    }
                 }
             }
         }