-1

Anybody knows the implementation of function of uploading a entire file to a specific branch of a specific project on gitlab UI portal ?

I want to upload a single file to specified branch of specified project , but there is no suitable api interface. I have checked the gitlab api document, and there is "POST /projects/:id/uploads" which help upload a file to a project but not under the branch of the project , and "/projects/:id/repository/files/:filePath" which creates a new file under the specified branch of project but it only support content of file ,not a entire file. So, these two interfaces cannot solve my problem.

Does anyone face the issue ? any help will be appreciated!

vs97
  • 5,765
  • 3
  • 28
  • 41
J. yan
  • 1

1 Answers1

0

You have the commit API: https://docs.gitlab.com/ee/api/commits.html#create-a-commit-with-multiple-files-and-actions

This seems to be what you need.

djuarezg
  • 2,307
  • 2
  • 20
  • 34