Skip to content

Group avatar - file format not supported issue #2750

@trafford-tbe

Description

@trafford-tbe

Description of the problem, including code/CLI snippet

I'm trying to add avatar to group using following command:

gitlab -v group create --name "Test 1" --path "test1" --parent-id 21 --avatar "/tmp/logo_lab.png"

where:

  1. Group creation without --avatar option works correctly.
  2. Path to .png is absulute path to file with correct read permissions.
  3. The same file added using web-gui dispalys correctly.

Expected Behavior

Avatar added to group.

Actual Behavior

Message returned:
Impossible to create object (400: Failed to save group {:avatar=>["file format is not supported. Please try one of the following supported formats: image/png, image/jpeg, image/gif, image/bmp, image/tiff, image/vnd.microsoft.icon"]})

Specifications

  • python-gitlab version: 4.2.0
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): v16.6.2-ee

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions