diff --git a/Examples/_shared/GiphyAPI.swift b/Examples/_shared/GiphyAPI.swift index a9cdfd73e..cd9777d16 100644 --- a/Examples/_shared/GiphyAPI.swift +++ b/Examples/_shared/GiphyAPI.swift @@ -24,8 +24,9 @@ extension Giphy: TargetType { public var task: Task { switch self { case let .upload(data): - let multipartFormData = [MultipartFormData(provider: .data(data), name: "file", fileName: "gif.gif", mimeType: "image/gif")] - return .uploadCompositeMultipart(multipartFormData, urlParameters: ["api_key": "dc6zaTOxFJmzC", "username": "Moya"]) + let multipartFormBodyParts = [MultipartFormBodyPart(provider: .data(data), name: "file", fileName: "gif.gif", mimeType: "image/gif")] + let multipartFormData = MultipartFormData(fileManager: .default, boundary: nil, parts: multipartFormBodyParts) + return .uploadCompositeMultipartFormData(multipartFormData, urlParameters: ["api_key": "dc6zaTOxFJmzC", "username": "Moya"]) } } public var sampleData: Data {