Skip to content

Commit

Permalink
0.12.0 (#114)
Browse files Browse the repository at this point in the history
* allow setting signature from external source

* lib version bump

* Update README.md

* Update Upload API.md

* formatting

* Update Upload API.md

* custom uploadSignature can be provided for methods:
- Upload file from url
- Multipart file uploading
-  Create files group from a set of files
- Create files group from a set of files UUIDs.
- Files group info

* custom uploadSignature can be provided for main uploadFile method that decides which upload method to use internally

* custom uploadSignature can be provided for upload method of UploadedFile object

* increase timeout for video conversion integration test

* documentation updated

* Update Sources/Uploadcare/Uploadcare.swift

Co-authored-by: Roman Sedykh <[email protected]>

* Update README.md

Co-authored-by: Roman Sedykh <[email protected]>

* Update Documentation/Upload API.md

Co-authored-by: Roman Sedykh <[email protected]>

* Update README.md

* Update README.md

* Update README.md

* Update Upload API.md

* Update README.md

* Update README.md

* Update Upload API.md

* Update REST API.md

* Update Documentation/REST API.md

Co-authored-by: Roman Sedykh <[email protected]>

* Update Documentation/REST API.md

Co-authored-by: Roman Sedykh <[email protected]>

* Update Documentation/Upload API.md

Co-authored-by: Roman Sedykh <[email protected]>

* Update Documentation/Upload API.md

Co-authored-by: Roman Sedykh <[email protected]>

* Update README.md

Co-authored-by: Roman Sedykh <[email protected]>

* Update README.md

Co-authored-by: Roman Sedykh <[email protected]>

* fixed when storing behavour param was missing for direct upload request

* version bump

* removed deprecated files for tests

* Swift version 5.1 -> 5.6

* removed unused allTests property in tests

* refactoring

* refactoring

* refactoring

* bumped api version to 0.7

* - removed sorting by size for getting list of files method
- data param for dateTimeUploadedASC ordering is optional now

* removed rekognitionInfo from File model

* removed imageInfo from File model

* removed videoInfo from File model

* warning

* metadata added to File model

* docs

* order

* Improvements for handling responses in RequestManager

* Added methods for REST API to get/update/delete File metadata

* store group method is not available for REST API anymore

* use keyDecodingStrategy for decoders

* Revert "use keyDecodingStrategy for decoders"

This reverts commit d210ca2.

* added contentInfo property to File data model

* delete group method added for REST API

* models updated

* added FileInfoQuery to set request query to include appdata

* new models for AppData added

* refactoring

* appData field added for File model

* refactoring

* execute AWS recognition method added

* added method to check aws recognition status

* integration tests for aws recognition execution and and status check

* Added execution of ClamAV addon, checking it’s status and integration tests for it

* RemoveBGAddonExecutionParams model added

* remove.bg addon execution and status + refactoring

* integration tests for remove.bg addon methods

* done field added to UploadedFile model

* added contentInfo file to UploadedFile model

* added metadata property to UploadedFile model

* bump lib version

* metadata can be provided for upload from url method

* metadata can be provided for direct upload method

* metadata can be provided for multipart uploads

* set swift version 5.5

* demo app fixed

* updated project for carthage

* more swift versions

* podfile updated

* warning removed

* set lib version 0.9.0

* metadata param for main upload method

- metadata param for main upload method
- don’t get fileinfo if only public key provided after direct upload

integration test for direct upload when only public key provided

* pass metadata from UploadedFile when calling upload

* added integratin test for multipart uploading if only public key provided

* Update README.md

* Update REST API.md

* Update REST API.md

* Update REST API.md

* Update REST API.md

* Update Upload API.md

* Update README.md

* Update test.yml

* Update REST API.md

* Update REST API.md

* Update Upload API.md

* Update REST API.md

* Update REST API.md

* couple links updated

* test updated

* fixed parsing of UploadedFile model

* added new integration test to upload a video file and check that parsing of response works

* version bump

* spaces

* cleanup

* async tests file

* async version of getProjectInfo and test

* formatting

* async getListOfWebhooks and test

* async performRequest

* async webhooks methods

* refactoring

* refactoring

* async listOfGroups and groupInfo + tests

* async list of files and tests

* one more test

* async pagination for list of files

* async fileinfo and test

* error handling

* refactoring

* refactoring

* async groups list and pagination + tests

* Equatable conformance

* Equatable for Group and check results in test

* async getAuthenticatedUrlFromUrl and test

* UploadAPIIntegrationAsyncTests

* async directUploadInForeground and test

* async deleteFile and test

* async deleteFiles and test

* async storeFile and test

* async storeFiles and test

* async copyFileToLocalStorage and test

* async copyFileToRemoteStorage and test

* async convertDocuments, convertDocumentsWithSettings, documentConversionJobStatus and tests

* async convertVideosWithSettings, convertVideos, videoConversionJobStatus and tests

* …

* async methods for metadata and test

* Async methods for AWS recognition and test

* Async methods for Clamav addon and test

* async methods for Remove.bg addon and tests

* async deleteGroup method

* refactoring

* async methods for upload from url and it’s status and test

* warning fixed

* async fileInfo and test

* updated unsplash link

* tests refactoring

* async multipart upload and test

* test improved

* uploadSignature param for directUploadInForeground

* async uploadFile method in Uploadcare class + test

* docs

* async upload method for UploadedFile class and test

* test updated

* async methods to create groups + tests

* tests renames

* cleanup

* tests annotation

* fixed build for tvOS

* annotation

* fixed build for watchOS

* tests are available for watchOS too

* …

* documentation updated

* docs

* docs

* docs

* docs

* docs

* spaces

* docs

* docs

* docs

* docs

* docs

* docs

* docs

* docs

* readme

* update semf

* demo app refactoring

* async

* refactoring

* more async methods

* dead link

* more async

* widget updated to fix a warning

* use new AsyncImage in widget

* warning fixed

* cleanup

* async files load in demo app

* discardableResult

* async file delete in demo

* demo app project updated

* readme updated

* docs updated

* docs updated

* test updated

* docs with examples

* docs

* docs

* docs

* docs

* REST API docs

* docs

* docs

* couple fixes

* uploadAndWaitForCompletion method and test added

* docs

* bump lib version

* podspec updated

* updated carthage project

* Update README.md

* bump version to 0.10.0

* podspec updated

* Update test.yml

* Linux support (#111)

* wip

* dependencies for Linux

* package version

* nsec

* wip

* wip

* wip

* wip

* commented code that breaks building for linux

* use apple's Crypto

* sha1 and sha256 implementations using Crypto

* AsyncHTTPClient for requests

* Package.reslolved

* wip

* empty line

* wip

* disable tests for methods with callbacks for LInux

* disable CI for PRs to develop for now

* wip

* wip

* wip

* removed force unwrapping in tests

* return Data from request if need

* directUploadInForeground for Linux

* space

* default store value - auto

* multipart upload for Linux

* fix

* fixes

* no need to delete headers

* added testing on Ubuntu in workflow

* Update test.yml

* Update test.yml

* swift-tools-version:5.6

---------

Co-authored-by: Sergei Armodin <[email protected]~>

* version bump

* swift-crypto 3.0.0

* marked audio property of ContentInfo as required

* removed deprecated methods

* Webhook model is updated

* version property updated for Webhook model

* event param for create and update webhook methods

* one more test

* docs updated

* added saveInGroup param for convertDocuments methods

* fixed Carthage project

* added testing with Swift 5.9 on Ubuntu

* version bump

* sources list updated in widget

* menu UI fixed

* tests updated

* widget refactoring

* widget cookie fix

* async getSourceChunk

* async loadMore

* async uploadFileFromPath

* smaller list of sources

* run tests on Ubuntu for minimum and maximum supported Swift versions only

* formatting

* added back OneDrive external source for widget

---------

Co-authored-by: Roman Sedykh
Co-authored-by: Sergei Armodin
  • Loading branch information
makoni authored Oct 4, 2023
1 parent 84148eb commit 5b298ea
Show file tree
Hide file tree
Showing 25 changed files with 343 additions and 1,138 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
swift: [5.8.1, 5.7.3, 5.6.3]
swift: [5.9, 5.6.3]

steps:
- name: Checkout
Expand Down
57 changes: 33 additions & 24 deletions Demo/Demo/Views/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ struct MainView: View {
@State private var messageText: String = ""

@State var isUploading: Bool = false


private let sources: [SocialSource] = [
SocialSource(source: .facebook),
SocialSource(source: .gdrive),
SocialSource(source: .gphotos),
SocialSource(source: .dropbox),
SocialSource(source: .instagram),
SocialSource(source: .onedrive)
]

var body: some View {
NavigationView {
ZStack {
Expand All @@ -42,34 +51,13 @@ struct MainView: View {
.navigationBarTitle(Text("Uploadcare demo"), displayMode: .automatic)
.sheet(isPresented: self.$widgetVisible, content: {
NavigationView {
SelectSourceView(publicKey: publicKey)
SelectSourceView(publicKey: publicKey, sources: sources)
.navigationBarItems(trailing: Button("Close") {
self.widgetVisible = false
})
.environmentObject(api)
}
})

.actionSheet(isPresented: $isShowingAddFilesAlert, content: {
ActionSheet(
title: Text("Select source"),
message: Text(""),
buttons: [
.default(Text("Photos"), action: {
self.pickerType = .photos
self.isShowingSheetWithPicker.toggle()
}),
.default(Text("Files"), action: {
self.pickerType = .files
self.isShowingSheetWithPicker.toggle()
}),
.default(Text("External Sources"), action: {
self.widgetVisible = true
}),
.cancel()
]
)
})
.sheet(isPresented: $isShowingSheetWithPicker) {
if self.pickerType == .photos {
ImagePicker(sourceType: .photoLibrary) { (imageUrl) in
Expand Down Expand Up @@ -144,7 +132,28 @@ struct MainView: View {
self.filesListStore.uploadcare = self.api.uploadcare
}
self.isShowingAddFilesAlert.toggle()
}.buttonStyle(NeumorphicButtonStyle(bgColor: Color.gray.opacity(0.05)))
}
.buttonStyle(NeumorphicButtonStyle(bgColor: Color.gray.opacity(0.05)))
.actionSheet(isPresented: $isShowingAddFilesAlert, content: {
ActionSheet(
title: Text("Select source"),
message: Text(""),
buttons: [
.default(Text("Photos"), action: {
self.pickerType = .photos
self.isShowingSheetWithPicker.toggle()
}),
.default(Text("Files"), action: {
self.pickerType = .files
self.isShowingSheetWithPicker.toggle()
}),
.default(Text("External Sources"), action: {
self.widgetVisible = true
}),
.cancel()
]
)
})
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions Documentation/REST API.md
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,10 @@ Create and subscribe to a webhook. You can use webhooks to receive notifications
let url = URL(string: "https://yourwebhook.com")!

// Async:
let webhook = try await uploadcare.createWebhook(targetUrl: url, isActive: true, signingSecret: "someSigningSecret")
let webhook = try await uploadcare.createWebhook(targetUrl: url, event: .fileUploaded, isActive: true, signingSecret: "someSigningSecret")

// With a completion callback:
uploadcare.createWebhook(targetUrl: url, isActive: true, signingSecret: "someSigningSecret") { result in
uploadcare.createWebhook(targetUrl: url, event: .fileUploaded, isActive: true, signingSecret: "someSigningSecret") { result in
switch result {
case .failure(let error):
print(error)
Expand All @@ -537,10 +537,10 @@ let url = URL(string: "https://yourwebhook.com")!
let webhookId = 100

// Async:
let webhook = try await uploadcare.updateWebhook(id: webhookId, targetUrl: url, isActive: false, signingSecret: "someNewSigningSecret")
let webhook = try await uploadcare.updateWebhook(id: webhookId, targetUrl: url, event: .fileInfoUpdated, isActive: false, signingSecret: "someNewSigningSecret")

// With a completion callback:
uploadcare.updateWebhook(id: webhookId, targetUrl: url, isActive: true, signingSecret: "someNewSigningSecret") { result in
uploadcare.updateWebhook(id: webhookId, targetUrl: url, event: .fileInfoUpdated, isActive: true, signingSecret: "someNewSigningSecret") { result in
switch result {
case .failure(let error):
print(error)
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PackageDescription
#if os(Linux)
let dependencies: [PackageDescription.Package.Dependency] = [
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.18.0"),
.package(url: "https://github.com/apple/swift-crypto.git", "1.0.0" ..< "3.0.0")
.package(url: "https://github.com/apple/swift-crypto.git", "1.0.0" ..< "4.0.0")
]
let targetDependencies: [PackageDescription.Target.Dependency] = [
.product(name: "AsyncHTTPClient", package: "async-http-client"),
Expand Down
2 changes: 1 addition & 1 deletion Sources/Uploadcare/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal let RESTAPIHost = "api.uploadcare.com"
/// Library name
internal let libraryName = "UploadcareSwift"
/// Library version
internal let libraryVersion = "0.11.0"
internal let libraryVersion = "0.12.0"

/// API version
internal let APIVersion = "0.7"
59 changes: 39 additions & 20 deletions Sources/Uploadcare/Uploadcare.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1545,10 +1545,10 @@ extension Uploadcare {
}
}

private func createWebhookRequestBody(targetUrl: URL, isActive: Bool, signingSecret: String? = nil) throws -> Data {
private func createWebhookRequestBody(targetUrl: URL, event: Webhook.Event, isActive: Bool, signingSecret: String? = nil) throws -> Data {
var bodyDictionary = [
"target_url": targetUrl.absoluteString,
"event": "file.uploaded", // Presently, we only support the file.uploaded event.
"event": event.rawValue,
"is_active": "\(isActive)"
]

Expand All @@ -1564,7 +1564,7 @@ extension Uploadcare {
/// Example:
/// ```swift
/// let url = URL(string: "https://yourwebhook.com")!
/// uploadcare.createWebhook(targetUrl: url, isActive: true, signingSecret: "someSigningSecret") { result in
/// uploadcare.createWebhook(targetUrl: url, event: .fileUploaded, isActive: true, signingSecret: "someSigningSecret") { result in
/// switch result {
/// case .failure(let error):
/// print(error)
Expand All @@ -1576,15 +1576,16 @@ extension Uploadcare {
///
/// - Parameters:
/// - targetUrl: An URL that is triggered by an event, for example, a file upload. A target URL MUST be unique for each project — event type combination.
/// - event: An event you subscribe to.
/// - isActive: Marks a subscription as either active or not, defaults to true, otherwise false.
/// - signingSecret: Optional secret that, if set, will be used to calculate signatures for the webhook payloads.
/// - completionHandler: Completion handler.
#if !os(Linux)
public func createWebhook(targetUrl: URL, isActive: Bool, signingSecret: String? = nil, _ completionHandler: @escaping (Result<Webhook, RESTAPIError>) -> Void) {
public func createWebhook(targetUrl: URL, event: Webhook.Event = .fileUploaded, isActive: Bool, signingSecret: String? = nil, _ completionHandler: @escaping (Result<Webhook, RESTAPIError>) -> Void) {
let url = urlWithPath("/webhooks/")
var urlRequest = requestManager.makeUrlRequest(fromURL: url, method: .post)
do {
urlRequest.httpBody = try createWebhookRequestBody(targetUrl: targetUrl, isActive: isActive, signingSecret: signingSecret)
urlRequest.httpBody = try createWebhookRequestBody(targetUrl: targetUrl, event: event, isActive: isActive, signingSecret: signingSecret)
} catch let error {
DLog(error.localizedDescription)
}
Expand Down Expand Up @@ -1614,14 +1615,15 @@ extension Uploadcare {
///
/// - Parameters:
/// - targetUrl: An URL that is triggered by an event, for example, a file upload. A target URL MUST be unique for each project — event type combination.
/// - event: An event you subscribe to.
/// - isActive: Marks a subscription as either active or not, defaults to true, otherwise false.
/// - signingSecret: Optional secret that, if set, will be used to calculate signatures for the webhook payloads
/// - Returns: Created webhook.
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public func createWebhook(targetUrl: URL, isActive: Bool, signingSecret: String? = nil) async throws -> Webhook {
public func createWebhook(targetUrl: URL, event: Webhook.Event = .fileUploaded, isActive: Bool, signingSecret: String? = nil) async throws -> Webhook {
let url = urlWithPath("/webhooks/")
var urlRequest = requestManager.makeUrlRequest(fromURL: url, method: .post)
urlRequest.httpBody = try createWebhookRequestBody(targetUrl: targetUrl, isActive: isActive, signingSecret: signingSecret)
urlRequest.httpBody = try createWebhookRequestBody(targetUrl: targetUrl, event: event, isActive: isActive, signingSecret: signingSecret)
requestManager.signRequest(&urlRequest)

do {
Expand All @@ -1638,7 +1640,7 @@ extension Uploadcare {
/// ```swift
/// let url = URL(string: "https://yourwebhook.com")!
/// let webhookId = 100
/// uploadcare.updateWebhook(id: webhookId, targetUrl: url, isActive: true, signingSecret: "someNewSigningSecret") { result in
/// uploadcare.updateWebhook(id: webhookId, targetUrl: url, event: .fileInfoUpdated, isActive: true, signingSecret: "someNewSigningSecret") { result in
/// switch result {
/// case .failure(let error):
/// print(error)
Expand All @@ -1651,15 +1653,16 @@ extension Uploadcare {
/// - Parameters:
/// - id: Webhook ID.
/// - targetUrl: Where webhook data will be posted.
/// - event: An event you subscribe to.
/// - isActive: Marks a subscription as either active or not.
/// - signingSecret: Optional secret that, if set, will be used to calculate signatures for the webhook payloads.
/// - completionHandler: Completion handler.
#if !os(Linux)
public func updateWebhook(id: Int, targetUrl: URL, isActive: Bool, signingSecret: String? = nil, _ completionHandler: @escaping (Result<Webhook, RESTAPIError>) -> Void) {
public func updateWebhook(id: Int, targetUrl: URL, event: Webhook.Event = .fileUploaded, isActive: Bool, signingSecret: String? = nil, _ completionHandler: @escaping (Result<Webhook, RESTAPIError>) -> Void) {
let url = urlWithPath("/webhooks/\(id)/")
var urlRequest = requestManager.makeUrlRequest(fromURL: url, method: .put)
do {
urlRequest.httpBody = try createWebhookRequestBody(targetUrl: targetUrl, isActive: isActive, signingSecret: signingSecret)
urlRequest.httpBody = try createWebhookRequestBody(targetUrl: targetUrl, event: event, isActive: isActive, signingSecret: signingSecret)
} catch let error {
DLog(error.localizedDescription)
}
Expand All @@ -1683,6 +1686,7 @@ extension Uploadcare {
/// let webhook = try await uploadcare.updateWebhook(
/// id: webhookId,
/// targetUrl: url,
/// event: .fileInfoUpdated,
/// isActive: false,
/// signingSecret: "someNewSigningSecret"
/// )
Expand All @@ -1691,14 +1695,15 @@ extension Uploadcare {
/// - Parameters:
/// - id: Webhook ID
/// - targetUrl: Where webhook data will be posted.
/// - event: An event you subscribe to.
/// - isActive: Marks a subscription as either active or not.
/// - signingSecret: Optional secret that, if set, will be used to calculate signatures for the webhook payloads.
/// - Returns: Updated webhook.
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public func updateWebhook(id: Int, targetUrl: URL, isActive: Bool, signingSecret: String? = nil) async throws -> Webhook {
public func updateWebhook(id: Int, targetUrl: URL, event: Webhook.Event = .fileUploaded, isActive: Bool, signingSecret: String? = nil) async throws -> Webhook {
let url = urlWithPath("/webhooks/\(id)/")
var urlRequest = requestManager.makeUrlRequest(fromURL: url, method: .put)
urlRequest.httpBody = try createWebhookRequestBody(targetUrl: targetUrl, isActive: isActive, signingSecret: signingSecret)
urlRequest.httpBody = try createWebhookRequestBody(targetUrl: targetUrl, event: event, isActive: isActive, signingSecret: signingSecret)
requestManager.signRequest(&urlRequest)

do {
Expand Down Expand Up @@ -1794,15 +1799,21 @@ extension Uploadcare {
public func convertDocuments(
_ paths: [String],
store: StoringBehavior? = nil,
saveInGroup: Bool? = nil,
_ completionHandler: @escaping (Result<ConvertDocumentsResponse, RESTAPIError>) -> Void
) {
let url = urlWithPath("/convert/document/")
var urlRequest = requestManager.makeUrlRequest(fromURL: url, method: .post)

let storeValue = store == StoringBehavior.auto ? .store : store
var saveInGroupValue: String? = nil
if let saveInGroup {
saveInGroupValue = saveInGroup ? "true" : "false"
}
let requestData = ConvertRequestData(
paths: paths,
store: storeValue?.rawValue ?? StoringBehavior.store.rawValue
store: storeValue?.rawValue ?? StoringBehavior.store.rawValue,
saveInGroup: saveInGroupValue
)

urlRequest.httpBody = try? JSONEncoder().encode(requestData)
Expand Down Expand Up @@ -1832,14 +1843,19 @@ extension Uploadcare {
/// - store: A flag indicating if we should store your outputs.
/// - Returns: Operation response.
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public func convertDocuments(_ paths: [String], store: StoringBehavior? = nil) async throws -> ConvertDocumentsResponse {
public func convertDocuments(_ paths: [String], store: StoringBehavior? = nil, saveInGroup: Bool? = nil) async throws -> ConvertDocumentsResponse {
let url = urlWithPath("/convert/document/")
var urlRequest = requestManager.makeUrlRequest(fromURL: url, method: .post)

let storeValue = store == StoringBehavior.auto ? .store : store
var saveInGroupValue: String? = nil
if let saveInGroup {
saveInGroupValue = saveInGroup ? "true" : "false"
}
let requestData = ConvertRequestData(
paths: paths,
store: storeValue?.rawValue ?? StoringBehavior.store.rawValue
store: storeValue?.rawValue ?? StoringBehavior.store.rawValue,
saveInGroup: saveInGroupValue
)

urlRequest.httpBody = try? JSONEncoder().encode(requestData)
Expand Down Expand Up @@ -1881,11 +1897,12 @@ extension Uploadcare {
public func convertDocumentsWithSettings(
_ tasks: [DocumentConversionJobSettings],
store: StoringBehavior? = nil,
saveInGroup: Bool? = nil,
_ completionHandler: @escaping (Result<ConvertDocumentsResponse, RESTAPIError>) -> Void
) {
var paths = [String]()
tasks.forEach({ paths.append($0.stringValue) })
convertDocuments(paths, store: store, completionHandler)
convertDocuments(paths, store: store, saveInGroup: saveInGroup, completionHandler)
}
#endif

Expand Down Expand Up @@ -1914,10 +1931,10 @@ extension Uploadcare {
/// - store: A flag indicating if we should store your outputs.
/// - Returns: Operation response.
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public func convertDocumentsWithSettings(_ tasks: [DocumentConversionJobSettings], store: StoringBehavior? = nil) async throws -> ConvertDocumentsResponse {
public func convertDocumentsWithSettings(_ tasks: [DocumentConversionJobSettings], store: StoringBehavior? = nil, saveInGroup: Bool? = nil) async throws -> ConvertDocumentsResponse {
var paths = [String]()
tasks.forEach({ paths.append($0.stringValue) })
return try await convertDocuments(paths, store: store)
return try await convertDocuments(paths, store: store, saveInGroup: saveInGroup)
}

/// Document conversion job status.
Expand Down Expand Up @@ -2096,7 +2113,8 @@ extension Uploadcare {
let storeValue = store == StoringBehavior.auto ? .store : store
let requestData = ConvertRequestData(
paths: paths,
store: storeValue?.rawValue ?? StoringBehavior.store.rawValue
store: storeValue?.rawValue ?? StoringBehavior.store.rawValue,
saveInGroup: nil
)

urlRequest.httpBody = try? JSONEncoder().encode(requestData)
Expand Down Expand Up @@ -2136,7 +2154,8 @@ extension Uploadcare {
let storeValue = store == StoringBehavior.auto ? .store : store
let requestData = ConvertRequestData(
paths: paths,
store: storeValue?.rawValue ?? StoringBehavior.store.rawValue
store: storeValue?.rawValue ?? StoringBehavior.store.rawValue,
saveInGroup: nil
)

urlRequest.httpBody = try? JSONEncoder().encode(requestData)
Expand Down
Loading

0 comments on commit 5b298ea

Please sign in to comment.