如何在Salesforce本机iOS应用程序中更新用户个人资料照片

时间:2018-08-29 09:46:51

标签: ios salesforce

如何在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)
        }
    }
}

0 个答案:

没有答案