Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

REST API for Documents

edited Jun 18, 2019 7:19PM in Content Management 1 comment

Summary

Uploading documents

Content

Can somebody please share a syntax example of how to upload a file? I've got a working Bearer Token and a URL for the site, a parent folder where to host and a file itself. I just don't understand how the multipart/form-data content type should be type. Does this work with a single curl call?

I'm trying this syntax

curl -i -H 'Authorization: Bearer tokenValue' -F 'parentID: F6F9E06748241C3CBB2DEF2EF6C3FF17C1177A968060' -F 'primaryFile:another-sample.txt' POST https://oradocs-corp.documents.us2.oraclecloud.com

and I'm getting the following curl error

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!