Get instance's global settings for Attachment
GET
/settings/attachment
const url = 'https://gitea.example.com/api/v1/settings/attachment';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://gitea.example.com/api/v1/settings/attachment \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”GeneralAttachmentSettings
Media typeapplication/json
GeneralAttachmentSettings contains global Attachment settings exposed by API
object
allowed_types
string
enabled
boolean
max_files
integer format: int64
max_size
integer format: int64
Examplegenerated
{ "allowed_types": "example", "enabled": true, "max_files": 1, "max_size": 1}