module Gitlab::Client::Projects

def upload_file(id, file_fullpath)

Returns:
  • (Gitlab::ObjectifiedHash) -

Parameters:
  • file_fullpath (String) -- The fullpath of the file you are interested to upload.
  • id (Integer, String) -- The ID or path of a project.

Other tags:
    See: https://docs.gitlab.com/ee/api/projects.html#upload-a-file -
def upload_file(id, file_fullpath)
  post("/projects/#{url_encode id}/uploads", body: { file: File.open(file_fullpath, 'r') })
end