Skip to content

Commit

Permalink
add custom param with string value
Browse files Browse the repository at this point in the history
  • Loading branch information
MMasterson committed Dec 7, 2020
1 parent 7d0985b commit 38e907f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Example/Transloadit/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavig

assembly.addStep(name: "resize", options: newSteps)
assembly.addCustomParam(key: "Custom", dictionary: ["TestKey": "TestValue"])
assembly.addCustomParam(key: "Custom2", string: "TestValue2")

assembly.addFile(withPathURL: imageURL as! URL)
assembly.save()

Expand Down
2 changes: 1 addition & 1 deletion Transloadit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'Transloadit'
s.version = '2.1.2.alpha'
s.version = '2.1.3.alpha'
s.summary = 'A short description of Transloadit.'
s.swift_version = '5.0'

Expand Down
4 changes: 4 additions & 0 deletions Transloadit/Classes/Assembly.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ public class Assembly: APIObject {
custom[key] = dictionary
}

public func addCustomParam(key: String, string: String) {
custom[key] = string
}

public func save() {

Transloadit.shared.invoke(assembly: self)
Expand Down

0 comments on commit 38e907f

Please sign in to comment.