mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-04-22 18:54:09 +02:00
Merge pull request #366 from matrix-org/markjh/filename
Document the optional parameter for specifying a filename
This commit is contained in:
commit
20eab7714f
|
|
@ -96,6 +96,46 @@ paths:
|
||||||
type: file
|
type: file
|
||||||
tags:
|
tags:
|
||||||
- Media
|
- Media
|
||||||
|
"/download/{serverName}/{mediaId}/{fileName}":
|
||||||
|
get:
|
||||||
|
summary: "Download content from the content repository as a given filename."
|
||||||
|
produces: ["*/*"]
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
type: string
|
||||||
|
name: serverName
|
||||||
|
x-example: matrix.org
|
||||||
|
required: true
|
||||||
|
description: |
|
||||||
|
The server name from the ``mxc://`` URI (the authoritory component)
|
||||||
|
- in: path
|
||||||
|
type: string
|
||||||
|
name: mediaId
|
||||||
|
x-example: ascERGshawAWawugaAcauga
|
||||||
|
required: true
|
||||||
|
description: |
|
||||||
|
The media ID from the ``mxc://`` URI (the path component)
|
||||||
|
- in: path
|
||||||
|
type: string
|
||||||
|
name: fileName
|
||||||
|
x-example: filename.jpg
|
||||||
|
required: true
|
||||||
|
description: |
|
||||||
|
The filename to give in the Content-Disposition
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: "The content that was previously uploaded."
|
||||||
|
headers:
|
||||||
|
Content-Type:
|
||||||
|
description: "The content type of the file that was previously uploaded."
|
||||||
|
type: "string"
|
||||||
|
Content-Disposition:
|
||||||
|
description: "The name of file given in the request"
|
||||||
|
type: "string"
|
||||||
|
schema:
|
||||||
|
type: file
|
||||||
|
tags:
|
||||||
|
- Media
|
||||||
"/thumbnail/{serverName}/{mediaId}":
|
"/thumbnail/{serverName}/{mediaId}":
|
||||||
get:
|
get:
|
||||||
summary: "Download a thumbnail of the content from the content repository."
|
summary: "Download a thumbnail of the content from the content repository."
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,8 @@ paths:
|
||||||
],
|
],
|
||||||
"pattern": "cake*lie",
|
"pattern": "cake*lie",
|
||||||
"rule_id": "nocake",
|
"rule_id": "nocake",
|
||||||
"enabled": true
|
"enabled": true,
|
||||||
|
"default": false
|
||||||
}
|
}
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
|
|
|
||||||
|
|
@ -15,3 +15,4 @@ go get gopkg.in/fsnotify.v1
|
||||||
|
|
||||||
(cd scripts/continuserv && go build)
|
(cd scripts/continuserv && go build)
|
||||||
(cd scripts/speculator && go build)
|
(cd scripts/speculator && go build)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue