Add receive mode warning, and print notification for each upload, in CLI mode

This commit is contained in:
Micah Lee 2018-03-14 07:35:04 -07:00
parent 01dd16d92f
commit 0b10e71547
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
3 changed files with 9 additions and 1 deletions

View File

@ -162,6 +162,9 @@ def main(cwd=None):
print('')
if receive:
print(strings._('receive_mode_warning'))
print('')
if stealth:
print(strings._("give_this_url_receive_stealth"))
print('http://{0:s}/{1:s}'.format(app.onion_host, web.slug))

View File

@ -305,6 +305,9 @@ class Web(object):
valid = True
self.common.log('Web', 'receive_routes', '/upload, uploaded {}, saving to {}'.format(f.filename, local_path))
print('')
print(strings._('receive_mode_received_file').format(local_path))
print('')
f.save(local_path)
# Note that flash strings are on English, and not translated, on purpose,

View File

@ -158,5 +158,7 @@
"info_in_progress_downloads_tooltip": "{} download(s) in progress",
"info_completed_downloads_tooltip": "{} download(s) completed",
"error_cannot_create_downloads_dir": "Error creating downloads folder: {}",
"error_downloads_dir_not_writable": "The downloads folder isn't writable: {}"
"error_downloads_dir_not_writable": "The downloads folder isn't writable: {}",
"receive_mode_warning": "Warning: Some files can hack your computer if you open them! Only open files from people you trust, or if you know what you're doing.",
"receive_mode_received_file": "Received file: {}"
}