Put PNG images in Gitlab Repo


I am having a problem to put png images in a gitlab repository with the gitlab API. I am trying this:

curl -X PUT --header “PRIVATE-TOKEN: ” --header “Content-Type: application/json” --data @solicitud.json https://gitlab.com/api/v4/projects//repository/files

where the solicitud.json is a json file with the next information on it:

“branch”: “main”,
“author_email”: XXX,
“author_name”: XXX,
“commit_message”: “Subiendo archivo”,
“encoding”: “base64”,
“file_path”: XXX,
“content”: The PNG base64 codification

But when I run this I get {“error”:“404 Not Found”}

Do anyone knows what is the problem?

Thank you very much, kind regards,

do you want it to be displayed or in the repo?

The truth is that I want to put the data there so then afterward I could take it and display it in a shiny application. I think that if I get the data and turn it to image then I can display it in the app.

I could resolved this with R. doing this:

ruta_imagen ← “./Ajuste_20220106.png”

imagen ← readBin(ruta_imagen, “raw”, file.size(ruta_imagen))

imagen_base64 ← base64encode(imagen)

project = “proj_number”,
file_path = “test.png”,
content = imagen_base64,
commit_message = “New test data”)

Do you know how to GET the data from R now??