Can't create a Document via Rest API
![GARZARELLAS](https://secure.gravatar.com/avatar/3a68da759b7ae75e5b2e0006c64e1a15/?default=https%3A%2F%2Fvanillicon.com%2F3c385e615d00729e1e4bf926800d3095_200.png&rating=g&size=200)
Hello,
we are using the POST API /v2/nodes to create a Document on our Content Server. The body of our request is:
{
"type": 144,
"parent_id": 5627091,
"name": "example.txt",
"file": "UXVlc3RvIMOoIHVuIGZpbGUgZGkgZXNlbXBpbw=="
}
but we get the following error: "error": "An illegal attempt was made to upload a document".
We tried the base64 encode. The user has full permissions to create documents in the folder.
Can anyone help us? Thank you.
Simone
Answers
-
AFAIK I have not seen a working example of sending a file as base64 you could try posting a file using multipart/form-data that is how Nodes with initial Version and Further adding versions happen
In this post below, I have included how you can use SmartUI and then trace the payload of a File addition.
try to look at this post
There is some stuff being said it was perhaps a few days before
https://forums.opentext.com/forums/developer/discussion/comment/969775#latest
https://forums.opentext.com/forums/developer/discussion/312086/does-create-document-in-v2-nodes-api-support-multipart-form-data#latest
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 156 General Questions
- 151 Thrust Services
- 57 Developer Hackathon
- 38 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 919 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 34 eDOCS
- 193 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories