|
@@ -43,10 +43,10 @@ extension FileProviderExtension {
|
|
|
if (metadata.hasPreview) {
|
|
|
|
|
|
let fileNamePath = CCUtility.returnFileNamePath(fromFileName: metadata.fileName, serverUrl: metadata.serverUrl, activeUrl: fileProviderData.sharedInstance.accountUrl)!
|
|
|
- //let fileNamePreviewLocalPath = CCUtility.getDirectoryProviderStoragePreviewOcId(metadata.ocId, etag: metadata.etag)!
|
|
|
+ let fileNamePreviewLocalPath = CCUtility.getDirectoryProviderStoragePreviewOcId(metadata.ocId, etag: metadata.etag)!
|
|
|
let fileNameIconLocalPath = CCUtility.getDirectoryProviderStorageIconOcId(metadata.ocId, etag: metadata.etag)!
|
|
|
|
|
|
- NCCommunication.shared.downloadPreview(fileNamePathOrFileId: fileNamePath, fileNamePreviewLocalPath: fileNameIconLocalPath , widthPreview: Int(k_sizeIcon), heightPreview: Int(k_sizeIcon)) { (account, imagePreview, imageIcon, errorCode, errorDescription) in
|
|
|
+ NCCommunication.shared.downloadPreview(fileNamePathOrFileId: fileNamePath, fileNamePreviewLocalPath: fileNamePreviewLocalPath , widthPreview: Int(k_sizePreview), heightPreview: Int(k_sizePreview), fileNameIconLocalPath: fileNameIconLocalPath, sizeIcon: Int(k_sizeIcon)) { (account, imagePreview, imageIcon, errorCode, errorDescription) in
|
|
|
if errorCode == 0 && imageIcon != nil {
|
|
|
if let data = imageIcon!.pngData() {
|
|
|
perThumbnailCompletionHandler(itemIdentifier, data, nil)
|