Hello, I am trying to use a REST web service to create a document on

Hello,

I am trying to use a REST web service to create a document on the document management system of my customer. I encode documents in base 64. Nobody has used this webservice before in the company and people who have developed them are gone. The only available specification is the following one:

Web Service REST          POST type multipart/form-data on /documents/create

Name/Type/Description

- parentId/String/Parent folder ID
- objectName/String/Document name
- title/String/Document title
- Subject/String/Document subject
- authors/String/Author list separated by /
- keywords/String/Keywords separated by /
- isFullTextIndex/Boolean/True for index else False
- docDate/Date/Last modified date (mm/jj/aaaa)
- content/REST File/File content

My message body looks like this:

--AaB03xContent-Disposition: form-data; name="parentId"

0b02c1818249f69f
--AaB03xContent-Disposition: form-data; name="objectName"

Test.txt
--AaB03xContent-Disposition: form-data; na...

OriginalPostID-160996

OriginalPostID-160996

  Discussion posts and replies are publicly visible

Parents
  • ...me="title"

    Test
    --AaB03xContent-Disposition: form-data; name="subject"

    --AaB03xContent-Disposition: form-data; name="authors"

    ghost
    --AaB03xContent-Disposition: form-data; name="keywords"

    test
    --AaB03xContent-Disposition: form-data; name="isFullTextIndex"

    1
    --AaB03xContent-Disposition: form-data; name="docDate"

    08/04/2015
    --AaB03xContent-Disposition: form-data; name="content";
    Content-Type: application/octet-stream
    Content-Transfer-Encoding: base64

    QnVzaW5lcw==
    --AaB03x--

    The file is correctly created but the content is never decoded by the server. I have tried different configurations of Content-Type and Content-Transfer-Encoding with no result. Is there something that I misunderstand in the specification? Does it mean that the server does not accept encoding? If yes, what is the workaround?

    Thank you for your help.

    Cheers
Reply
  • ...me="title"

    Test
    --AaB03xContent-Disposition: form-data; name="subject"

    --AaB03xContent-Disposition: form-data; name="authors"

    ghost
    --AaB03xContent-Disposition: form-data; name="keywords"

    test
    --AaB03xContent-Disposition: form-data; name="isFullTextIndex"

    1
    --AaB03xContent-Disposition: form-data; name="docDate"

    08/04/2015
    --AaB03xContent-Disposition: form-data; name="content";
    Content-Type: application/octet-stream
    Content-Transfer-Encoding: base64

    QnVzaW5lcw==
    --AaB03x--

    The file is correctly created but the content is never decoded by the server. I have tried different configurations of Content-Type and Content-Transfer-Encoding with no result. Is there something that I misunderstand in the specification? Does it mean that the server does not accept encoding? If yes, what is the workaround?

    Thank you for your help.

    Cheers
Children
No Data