Commit 4842c5b4 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Provide upload command as http.

parent 4390f471
Pipeline #54095 passed with stages
in 16 minutes and 49 seconds
...@@ -528,7 +528,7 @@ class UploadCommandResource(Resource): ...@@ -528,7 +528,7 @@ class UploadCommandResource(Resource):
@login_really_required @login_really_required
def get(self): def get(self):
""" Get url and example command for shell based uploads. """ """ Get url and example command for shell based uploads. """
upload_url = '%s/uploads/?curl=True' % config.api_url() upload_url = '%s/uploads/?curl=True' % config.api_url(ssl=False)
upload_url_with_name = upload_url + '&name=<name>' upload_url_with_name = upload_url + '&name=<name>'
# upload_command = 'curl -X PUT -H "X-Token: %s" "%s" -F file=@<local_file>' % ( # upload_command = 'curl -X PUT -H "X-Token: %s" "%s" -F file=@<local_file>' % (
......
...@@ -156,11 +156,10 @@ tests = NomadConfig( ...@@ -156,11 +156,10 @@ tests = NomadConfig(
) )
def api_url(): def api_url(ssl: bool = True):
return '%s://%s%s%s' % ( return '%s://%s%s' % (
'https' if services.https else 'http', 'https' if services.https and ssl else 'http',
services.api_host, services.api_host,
':%s' % services.api_port if int(services.api_port) != 80 else '',
services.api_base_path) services.api_base_path)
......
Supports Markdown
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