Attachment serving
This commit is contained in:
@@ -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",
|
||||
|
||||
47
sam/docs/src/spec/attachment.json
Normal file
47
sam/docs/src/spec/attachment.json
Normal 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
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user