diff --git a/invenio_uploadbyurl/config.py b/invenio_uploadbyurl/config.py index 850bb04239f1ff23aa7fd42f557a4663b41e8152..f2d8f60013e66f348da484b158b63bb33190eb86 100644 --- a/invenio_uploadbyurl/config.py +++ b/invenio_uploadbyurl/config.py @@ -83,3 +83,5 @@ UPLOADBYURL_EMAIL_BODY_FAILED = 'Your upload failed. Please make sure ' \ UPLOADBYURL_REMOTE_SERVERS = {} """Special configuration option for remote server.""" + +SERVER_NAME = "localhost" diff --git a/invenio_uploadbyurl/errors.py b/invenio_uploadbyurl/errors.py index f5bb5f77a763ce97ea4641c040f3d56f317499d1..f9a4b86153f44e088717613f57c1dab6c16a1039 100644 --- a/invenio_uploadbyurl/errors.py +++ b/invenio_uploadbyurl/errors.py @@ -19,7 +19,7 @@ """REST Errors for invenio-uploadbyurl.""" -from flask import current_app +from flask import url_for from invenio_rest.errors import RESTException @@ -103,7 +103,10 @@ class AuthenticationError(RESTException): code = 400 description = 'SSH Authentication failed. Probably the SSH Key is ' \ 'not added to the remote server. Try to add it manually or ' \ - 'contact the support.' + 'contact the support. You can copy the SSH publick key ' \ + 'here'.format( + url_for('invenio_uploadbyurl_settings.index') + ) class SSHException(RESTException):