Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-08-16 15:08:51 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-08-16 15:08:51 +0300
commit108752cc74223d8ce04a18b46784d30b06571891 (patch)
treeecf52510899725952289d0b085e11d8a18034a0b /docs
parentf63f10195f9a0cab94aea89f722f63d818ce86dc (diff)
Docs for the asset API
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'docs')
-rw-r--r--docs/asset_api.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/asset_api.md b/docs/asset_api.md
new file mode 100644
index 00000000..6ec308a9
--- /dev/null
+++ b/docs/asset_api.md
@@ -0,0 +1,30 @@
+# Assets API
+
+This api is used to insert files directly from your Nextcloud to a collabora
+document.
+
+## Creating the asset
+
+```
+<sever>/apps/richdocuments/assets
+```
+
+A `POST` request to this endpoint with the `path` parameter will
+prepare the asset as `path` (relateive to the authenticated user).
+
+The return is json:
+
+```json
+{
+ url: <assetUrl>
+}
+```
+
+The `assetUrl` has to be send to the collabora server using the
+postMessage API.
+
+## Fetching an asset
+
+An asset can be fetched once from the url obtained when creating the asset.
+The asset will be served with a proper `Content-Type`.
+