mirror of
https://github.com/nextcloud/richdocuments.git
synced 2025-12-18 05:20:43 +01:00
Docs for the asset API
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
f63f10195f
commit
108752cc74
1 changed files with 30 additions and 0 deletions
30
docs/asset_api.md
Normal file
30
docs/asset_api.md
Normal file
|
|
@ -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`.
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue