Created
June 24, 2018 08:33
-
-
Save RichGreenTea/7ff825aa50da67bfae7298f89c65ace7 to your computer and use it in GitHub Desktop.
APIKitでMultipartFormDataBodyParametersを用いてimageをPOST/PATCHする際はvalue:でなくdata: ref: https://qiita.com/RichGreenTea/items/4fa960e41b568e845899
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
params.append(MultipartFormDataBodyParameters.Part( | |
data: imageData, | |
name: "image", | |
mimeType: "image/png", | |
fileName: "image.png")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
params.append(try! MultipartFormDataBodyParameters.Part( | |
value: value, | |
name: "value_name")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment