Get instance's global settings for Attachment
GET
/settings/attachment
const url = 'https://gitea.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.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
AllowedTypes contains the allowed file types for attachments
string
enabled
Enabled indicates if file attachments are enabled
boolean
max_files
MaxFiles is the maximum number of files per attachment
integer format: int64
max_size
MaxSize is the maximum size for individual attachments
integer format: int64
Examplegenerated
{ "allowed_types": "example", "enabled": true, "max_files": 1, "max_size": 1}