diff --git a/Sources/InternxtSwiftCore/Services/Network/NetworkFacade.swift b/Sources/InternxtSwiftCore/Services/Network/NetworkFacade.swift index b02179a..ce66bd8 100644 --- a/Sources/InternxtSwiftCore/Services/Network/NetworkFacade.swift +++ b/Sources/InternxtSwiftCore/Services/Network/NetworkFacade.swift @@ -81,7 +81,8 @@ public struct NetworkFacade { fileKey: [UInt8], iv: [UInt8], bucketId: String, - progressHandler: @escaping ProgressHandler + progressHandler: @escaping ProgressHandler, + debug: Bool = false ) async throws -> FinishUploadResponse { guard let encryptedOutputStream = OutputStream(url: encryptedOutput, append: true) else { throw NetworkFacadeError.FailedToOpenEncryptOutputStream @@ -185,7 +186,7 @@ public struct NetworkFacade { return finishUpload } - public func downloadFile(bucketId: String, fileId: String, encryptedFileDestination: URL, destinationURL: URL, progressHandler: @escaping ProgressHandler) async throws -> URL { + public func downloadFile(bucketId: String, fileId: String, encryptedFileDestination: URL, destinationURL: URL, progressHandler: @escaping ProgressHandler, debug: Bool = false) async throws -> URL { func downloadProgressHandler(downloadProgress: Double) { let downloadMaxProgress = 0.9; @@ -198,7 +199,8 @@ public struct NetworkFacade { bucketId:bucketId, fileId: fileId, destination: encryptedFileDestination, - progressHandler: downloadProgressHandler + progressHandler: downloadProgressHandler, + debug: debug ) diff --git a/Sources/InternxtSwiftCore/Services/Network/Upload.swift b/Sources/InternxtSwiftCore/Services/Network/Upload.swift index 31d9886..5160006 100644 --- a/Sources/InternxtSwiftCore/Services/Network/Upload.swift +++ b/Sources/InternxtSwiftCore/Services/Network/Upload.swift @@ -50,7 +50,7 @@ public class Upload: NSObject { } - func start(index: [UInt8], bucketId: String, mnemonic: String, encryptedFileURL: URL, debug: Bool = false, progressHandler: ProgressHandler? = nil) async throws -> FinishUploadResponse { + func start(index: [UInt8], bucketId: String, mnemonic: String, encryptedFileURL: URL, progressHandler: ProgressHandler? = nil, debug: Bool = false) async throws -> FinishUploadResponse { let source = encryptedFileURL let fileSize = source.fileSize