21 Replies Latest reply on May 2, 2017 1:30 PM by dipanjan

    Upload file directly(not from url)

    alided

      Hello,

      Sorry if this was already discussed, I couldn't find anything. I'm trying to upload a file using v3 API.

      From the documentation :

      https://developers.jivesoftware.com/api/v3/rest/ContentService.html#createContent(MultipartBody, String)

      {

        "content":

        {

        "type": "text/html",

        "text": "<body><p>Some interesting text</p></body>"

        },

        "subject": "New Document",

        "type": "document",

        "attachments": [ {

        "doUpload": true,

        "url": "http://www.mysite.com/images/cat.jpg"

        } ]

      }

      I was able to upload the file from the provided url(in bold), but i want to be able to upload my own file from the file system.

      In v2 i was able to use multipart upload with "body" parameter to upload a file to a document using this api /api/core/v2/documents/{id}/binaryBody

      Is there a way to do the same using v3 ?

       

      Thanks

      Albert