如何在salesforce本机iOS应用程序中更新用户个人资料图片?
func upload(data:Data, name:String) -> Promise<Bool> {
return Promise(.pending) { resolver in
restClient.uploadFile(data: data, name: name, description: "", mimeType: "jpeg/png")
.then { request in
self.restClient.send(request: request)
}.done { (response) in
print("Response is ========>>>>>>",response.asJsonDictionary())
resolver.fulfill(true)
}.catch { (error) in
resolver.reject(error)
}
}
}