Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
danepowell opened this issue Feb 23, 2023 · 3 comments · Fixed by #750
Closed

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

danepowell opened this issue Feb 23, 2023 · 3 comments · Fixed by #750

Comments

@danepowell
Copy link

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: acquia/cli#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.

@ajuchacko
Copy link
Contributor

ajuchacko commented Mar 15, 2023

Yes, curl command works.
Screenshot 2023-03-15 at 7 51 29 PM

I am not sure if this was working since day one. ea09dc7
Screenshot 2023-03-15 at 8 11 41 PM

@ajuchacko
Copy link
Contributor

Yo, Dane powell I saw a mr on gitlab made last year which has something to do with trailing slash.
So probably this would have been working in the past I guess.

@danepowell
Copy link
Author

Looks like this was fixed in #750, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants