From 8db3c584a031102c8e9981dc00099a9dc25eb542 Mon Sep 17 00:00:00 2001 From: sozohoy Date: Fri, 13 Sep 2024 01:11:31 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=AA=A8=EB=93=88=EA=B0=84=20=EC=88=9C?= =?UTF-8?q?=ED=99=98=20=EC=A2=85=EC=86=8D=EC=84=B1=20=ED=95=B4=EA=B2=B0=20?= =?UTF-8?q?=ED=9B=84=20=EB=B9=8C=EB=93=9C=20=EC=95=88=EB=90=98=EB=8D=98=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0(#144)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Core/Sources/AWS/AWSS3Uploader.swift | 16 +++++++++++++--- Core/Sources/Model/Keyword.swift | 2 +- .../Notification}/NotificationName+.swift | 4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) rename {Common/Sources/Extension => Core/Sources/Notification}/NotificationName+.swift (82%) diff --git a/Core/Sources/AWS/AWSS3Uploader.swift b/Core/Sources/AWS/AWSS3Uploader.swift index 6d5fc50..aa35545 100644 --- a/Core/Sources/AWS/AWSS3Uploader.swift +++ b/Core/Sources/AWS/AWSS3Uploader.swift @@ -9,7 +9,7 @@ import Foundation import Photos -import Common +//import Common import AWSS3 @@ -43,7 +43,7 @@ public class AWSS3Uploader { ) { result in switch result { case .success(let url): - videoUrl = url?.removeQueryParameters() + videoUrl = self.removeQueryParameters(url: url) case .failure(let failure): uploadError = failure } @@ -56,7 +56,7 @@ public class AWSS3Uploader { ) { result in switch result { case .success(let url): - thumbnailUrl = url?.removeQueryParameters() + thumbnailUrl = self.removeQueryParameters(url: url) case .failure(let failure): uploadError = failure } @@ -126,4 +126,14 @@ public class AWSS3Uploader { } uploadTask.resume() } + + private func removeQueryParameters(url: String?) -> String? { + guard let urlString = url else { return nil } + if let urlComponents = URLComponents(string: urlString) { + var modifiedComponents = urlComponents + modifiedComponents.query = nil + return modifiedComponents.string + } + return nil + } } diff --git a/Core/Sources/Model/Keyword.swift b/Core/Sources/Model/Keyword.swift index 54246fa..55c095a 100644 --- a/Core/Sources/Model/Keyword.swift +++ b/Core/Sources/Model/Keyword.swift @@ -2,7 +2,7 @@ // Keyword.swift // Core // -// Created by 한지석 on 7/10/24. +// Created by 한지석 on 9/13/24. // Copyright © 2024 com.recordy. All rights reserved. // diff --git a/Common/Sources/Extension/NotificationName+.swift b/Core/Sources/Notification/NotificationName+.swift similarity index 82% rename from Common/Sources/Extension/NotificationName+.swift rename to Core/Sources/Notification/NotificationName+.swift index 8e7c994..1f49b4c 100644 --- a/Common/Sources/Extension/NotificationName+.swift +++ b/Core/Sources/Notification/NotificationName+.swift @@ -1,8 +1,8 @@ // // NotificationName+.swift -// Common +// Core // -// Created by 한지석 on 7/19/24. +// Created by 한지석 on 9/13/24. // Copyright © 2024 com.recordy. All rights reserved. //