Commit b7296ee0 authored by Daniel Stone's avatar Daniel Stone
Browse files

Uploads: use API v4

parent a7a26ae3
......@@ -88,7 +88,7 @@ def processbug(bgo, bzurl, instance, resolution, target, user_cache,
return index
def gitlab_upload_file(target, filename, f, sudo=None):
url = "{}api/v3/projects/{}/uploads".format(target.gl_url,
url = "{}api/v4/projects/{}/uploads".format(target.gl_url,
target.get_project().id)
target.gl.session.headers = {"PRIVATE-TOKEN": target.token}
#if sudo:
......
......@@ -117,7 +117,7 @@ class GitLab:
import_status = self.get_import_status(project)
def upload_file(self, filename, f):
url = "{}api/v3/projects/{}/uploads".format(self.gl_url,
url = "{}api/v4/projects/{}/uploads".format(self.gl_url,
self.get_project().id)
self.gl.session.headers = {"PRIVATE-TOKEN": self.token}
ret = self.gl.session.post(url, files={
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment