Upload image in gitlab project using gitlab API

I am trying to upload an image to a project in gitlab. According to the documentation, it shouldn't be rocket science. I tried to pass the image as url and base-64 representation. If I encode a base-64 url, there is little progress - internal server error. Any ideas? Thank!

+3


source to share


1 answer


Since you didn't mention how you want to download.

With curl:

curl --request POST --header "PRIVATE-TOKEN: XXXXXXXXXX" --form "file=@dk.png" https://gitlab.example.com/api/v4/projects/5/uploads

      



5 is the ID of your project.

gitlab api doc

0


source







All Articles