From 708687341d6287e65abd98b4d761046dae2f95fc Mon Sep 17 00:00:00 2001 From: k12tr <47208812+ssl112@users.noreply.github.com> Date: Sun, 26 Jan 2025 11:04:26 +0300 Subject: [PATCH 1/2] Update Storage.swift unneccessary parameter removed from initiateUpload --- Sources/FalClient/Storage.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/FalClient/Storage.swift b/Sources/FalClient/Storage.swift index 1c12815..e823db7 100644 --- a/Sources/FalClient/Storage.swift +++ b/Sources/FalClient/Storage.swift @@ -90,7 +90,7 @@ struct StorageClient: Storage { return transformedInput } - func initiateUpload(data _: Data, ofType type: FileType) async throws -> UploadUrl { + func initiateUpload(ofType type: FileType) async throws -> UploadUrl { let input: Payload = [ "content_type": .string(type.mimeType), "file_name": .string("\(UUID().uuidString).\(type.fileExtension)"), From cb886333a28993439d0d7a4734f4e0b4a6c89c2a Mon Sep 17 00:00:00 2001 From: k12tr <47208812+ssl112@users.noreply.github.com> Date: Sun, 26 Jan 2025 11:20:29 +0300 Subject: [PATCH 2/2] Update Storage.swift initiateUpload method updated. --- Sources/FalClient/Storage.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/FalClient/Storage.swift b/Sources/FalClient/Storage.swift index e823db7..c43332f 100644 --- a/Sources/FalClient/Storage.swift +++ b/Sources/FalClient/Storage.swift @@ -104,7 +104,7 @@ struct StorageClient: Storage { } func upload(data: Data, ofType type: FileType) async throws -> String { - let uploadUrl = try await initiateUpload(data: data, ofType: type) + let uploadUrl = try await initiateUpload(ofType: type) // Upload the file to the upload URL. // Here we use URLSession directly instead of the client to avoid going