Skip to content

Commit

Permalink
🔧 upload urlrequest cachepolicy 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
loinsir committed Dec 4, 2023
1 parent 3b035c2 commit 5d157f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions iOS/Layover/Layover/Network/Provider/Provider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class Provider: ProviderType {
// 이미지 업로드용
func upload(data: Data, to url: String, method: HTTPMethod = .PUT) async throws -> Data {
guard let url = URL(string: url) else { throw NetworkError.components }
var request = URLRequest(url: url)
var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData)
request.httpMethod = method.rawValue

let (data, response) = try await session.upload(for: request, from: data)
Expand All @@ -118,7 +118,7 @@ class Provider: ProviderType {
sessionTaskDelegate: URLSessionTaskDelegate? = nil,
delegateQueue: OperationQueue? = nil) async throws -> Data {
guard let url = URL(string: url) else { throw NetworkError.components }
var request = URLRequest(url: url)
var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData)
request.httpMethod = method.rawValue
let backgroundSession = URLSession(configuration: .background(withIdentifier: UUID().uuidString),
delegate: sessionTaskDelegate,
Expand Down

0 comments on commit 5d157f7

Please sign in to comment.