Commit eb4dd716 authored by Marcin Sedlak-Jakubowski's avatar Marcin Sedlak-Jakubowski

Merge branch '280830-how-to-update-appearance-upload-images-via-api' into 'master'

Resolve "How to update appearance - upload images - via API"

See merge request gitlab-org/gitlab!47283
parents 81ffca3a a7e3fcfe
......@@ -54,7 +54,7 @@ PUT /application/appearance
| --------------------------------- | ------- | -------- | ----------- |
| `title` | string | no | Instance title on the sign in / sign up page
| `description` | string | no | Markdown text shown on the sign in / sign up page
| `logo` | mixed | no | Instance image used on the sign in / sign up page
| `logo` | mixed | no | Instance image used on the sign in / sign up page. See [Change logo](#change-logo)
| `header_logo` | mixed | no | Instance image used for the main navigation bar
| `favicon` | mixed | no | Instance favicon in `.ico` or `.png` format
| `new_project_guidelines` | string | no | Markdown text shown on the new project page
......@@ -87,3 +87,36 @@ Example response:
"email_header_and_footer_enabled": true
}
```
## Change logo
Upload a logo to your GitLab instance.
To upload an avatar from your file system, use the `--form` argument. This causes
cURL to post data using the header `Content-Type: multipart/form-data`. The
`file=` parameter must point to an image file on your file system and be
preceded by `@`.
```plaintext
PUT /application/appearance
```
| Attribute | Type | Required | Description |
| --------- | ------ | -------- | -------------- |
| `logo` | string | Yes | File to upload |
Example request:
```shell
curl --location --request PUT "https://gitlab.example.com/api/v4/application/appearance?data=image/png" \
--header "Content-Type: multipart/form-data" \
--header "PRIVATE-TOKEN: <your_access_token>" \
--form "logo=@/path/to/logo.png"
```
Returned object:
```json
{
"logo":"/uploads/-/system/appearance/logo/1/logo.png"
```
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment