1 Reply Latest reply on Oct 24, 2013 6:48 AM by arvikumar

    What should be the curl expression for uploading a .txt file to an existing Jive document?

    arvikumar

      Hi,

       

      What should be the curl expression for uploading a .txt file to an existing Jive document?

       

      I tried the below one without success which gives me the error as, file not found: http://localhost:8080/api/core/v3/attachments/contents/{contentID}

       

      curl -v -u username:password --header "Content-Type: multipart/form-data; boundary=SNIP" -d $'--SNIP\r\nContent-Disposition: form-data; filename="filename.txt"; name="foo"\r\nContent-Type: application/json\r\n\r\n{"type": "file"}\r\n--SNIP\r\nContent-Disposition: form-data; filename="filename.txt"; name="foo"\r\nContent-Type: text/html\r\n\r\nCONTENT\r\n--SNIP--\r\n'  "http://localhost:8080/api/core/v3/attachments/contents/{contentID}"

       

      Here contentID is the Jive documentID. Please note, the document is under a space.