Skip to content

Cannot upload project avatar: 'avatar is invalid' #739

@danepowell

Description

@danepowell

Our project calls uploadAvatar() after creating a GitLab project. I'm pretty sure this has worked in the past, but recently stopped working, throwing an avatar is invalid exception: https://github.com/acquia/cli/issues/1377

I did some debugging and it looks like a problem with this library. A curl request with the same avatar to the same API endpoint works fine:

curl --location --request PUT 'https://code.acquia.com/api/v4/projects/1092' --header 'Authorization: Bearer [snip]' --form 'avatar=@drupal_icon.png'

I suspect GitLab changed something in the expected file or PUT format that's breaking this call.

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