-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GET media/config #1189
GET media/config #1189
Changes from 3 commits
2783820
c9abf36
de6fe1b
ffc8ee2
077cd04
6b9640b
6d0a56d
ddc1523
80935ea
eeaf438
091b2a6
1820df0
21e957e
41c18be
a1309d6
d5ce87e
2e6cc80
77f4ac5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -269,3 +269,33 @@ paths: | |
"$ref": "definitions/error.yaml" | ||
tags: | ||
- Media | ||
"/limits": | ||
get: | ||
summary: Get limits on what can be uploaded to the content repository. | ||
Clients SHOULD use this as a guide when uploading content. | ||
All values are intentionally left optional, the client MUST assume | ||
that any field not given is not limited. | ||
|
||
**NOTE:** Reverse proxies may apply their own limits. | ||
|
||
If auth is not supplied, this endpoint gives the global limit of the server. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. gives the s/limit/configuration of the server likewise below: Otherwise it should give the s/limits/configuration for the authenticated user. and again: full words would be nice ( |
||
Otherwise it should give the limits applied to the authenticated user. | ||
operationId: getLimits | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably be updated |
||
produces: ["application/json"] | ||
security: | ||
- accessToken: [] | ||
responses: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a 429 should be added to indicate rate limiting:
|
||
200: | ||
description: The limits exposed by the matrix server. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given this endpoint is generic now, the general description should probably be generic as well. How does "The public content repository configuration for the matrix server." sound to you? |
||
schema: | ||
type: object | ||
properties: | ||
upload_size: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. proposal calls for |
||
type: number | ||
description: "The maximum size a upload can be in bytes." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. an upload |
||
examples: | ||
application/json: { | ||
"upload_size": 50000000 | ||
} | ||
tags: | ||
- Media |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably needs to clarify what it's talking about now, since this is now a generic /config API.
Edit: in fact this probably just needs to move to
m.upload.size
below