0

I am having trouble uploading a file from my custom android app. I am using the Salesforce SDK for android, and as I understand it, I need to use FileRequests.uploadFile to do that. So I am trying to send this request:

        File imgFile = (File) o;
        restRequest = FileRequests.uploadFile(imgFile, imgFile.getName(), "picture title", "description", "image/jpg");

Which once built looks like this :

{
      "method": "POST",
      "url": "\/services\/data\/v42.0\/chatter\/connect\/files\/users\/me",
      "httpHeaders": {
        "X-Chatter-Entity-Encoding": "false"
      }
    }

But I get an error in the response :

[{"errorCode":"NOT_FOUND","message":"The requested resource does not exist"}]

Which makes sense since this url doesn't exist in the workbench either. So my question is : what is the correct url for file upload ?

Am I missing something ? Any help would be appreciated

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.