Closed xrofa closed 3 years ago
For anyone stuggling with the same as I had, use this instead: `strapi.upload( contentType: "user", id: 1, field: "picture", source: "users-permissions", path: nil, filename: "myPic.jpg", mimeType: "image/jpg", image: profilePicture!, compressionQuality: 90, interceptor: interceptor, autoExecute: true) { (response) in
guard let record = response.dictionaryValue() else {
return
}
guard let error = record["error"] else {
return
}
print("got some error!: \(error)")
}`
On my Strapi I have the default User (from "user-permissions"), and I have on it a field called "picture". Using the upload I'm doing something like this: