3
0

Attachment serving

This commit is contained in:
Denis Arh
2018-09-10 12:25:36 +02:00
parent e351c73a0a
commit b04a681d81
10 changed files with 459 additions and 33 deletions

View File

@@ -468,6 +468,38 @@
}
]
},
{
"title": "Attachments",
"package": "sam",
"path": "/attachment/{attachmentID}",
"parameters": {
"path": [
{ "name": "attachmentID", "type": "uint64", "required": true, "title": "Attachment ID" }
]
},
"entrypoint": "attachment",
"authentication": ["Client ID", "Session ID"],
"apis": [
{
"name": "original",
"path": "/{name}",
"method": "GET",
"title": "Serves attached file",
"parameters": {
"GET": [
{ "type": "bool", "name": "download", "required": false, "title": "Force file download" }
]
}
},
{
"name": "preview",
"path": "/{name}/preview",
"method": "GET",
"title": "Serves preview of an attached file"
}
]
},
{
"title": "Users",
"package": "sam",

View File

@@ -0,0 +1,47 @@
{
"Title": "Attachments",
"Package": "sam",
"Interface": "Attachment",
"Struct": null,
"Parameters": {
"path": [
{
"name": "attachmentID",
"required": true,
"title": "Attachment ID",
"type": "uint64"
}
]
},
"Protocol": "",
"Authentication": [
"Client ID",
"Session ID"
],
"Path": "/attachment/{attachmentID}",
"APIs": [
{
"Name": "original",
"Method": "GET",
"Title": "Serves attached file",
"Path": "/{name}",
"Parameters": {
"GET": [
{
"name": "download",
"required": false,
"title": "Force file download",
"type": "bool"
}
]
}
},
{
"Name": "preview",
"Method": "GET",
"Title": "Serves preview of an attached file",
"Path": "/{name}/preview",
"Parameters": null
}
]
}