OpenSlides/docs/interfaces/media-service.txt

35 lines
1023 B
Plaintext
Raw Normal View History

2020-08-18 10:39:20 +02:00
/**
2020-12-08 10:05:00 +01:00
* Saves a mediafile (encoded as base64) into this service.
2020-08-18 10:39:20 +02:00
*
* Technical:
2020-12-08 10:05:00 +01:00
* POST to /internal/media/upload_mediafile/ with JSON payload.
* Returns 200 on success, 4xx on errors with a message in the payload.
2020-08-18 10:39:20 +02:00
*/
2020-12-08 10:05:00 +01:00
upload_mediafile(file: string, id: Id, mimetype: string): {message: string} | void
2020-08-18 10:39:20 +02:00
/**
2020-12-08 10:05:00 +01:00
* Saves a resource (encoded as base64) into this service.
2020-08-18 10:39:20 +02:00
*
* Technical:
2020-12-08 10:05:00 +01:00
* POST to /internal/media/upload_resource/ with JSON payload.
* Returns 200 on success, 4xx on errors with a message in the payload.
2020-08-18 10:39:20 +02:00
*/
2020-12-08 10:05:00 +01:00
upload_resource(file: string, id: Id, mimetype: string): {message: string} | void
/**
* Retrieves a mediafile given by it's id.
*
* Technical:
* GET to /system/media/get/<mediafile_id>
* Returns 200 on success and 404, if the resource does not exist
*/
get(mediafile_id: Id): Blob
/**
* Retrieves a resource given by it's id.
*
* Technical:
* GET to /system/media/get_resource/<resource_id>
* Returns 200 on success and 404, if the resource does not exist
*/
get(resource_id: Id): Blob