diff options
author | Micah Lee <micah@micahflee.com> | 2019-02-11 23:23:31 -0800 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2019-02-11 23:23:31 -0800 |
commit | dafe57cdef76a20d11e33c521fcfc06161dcb0c0 (patch) | |
tree | 54f3c8f357773948b9b3165d43bdef2467ebc7dd | |
parent | 5901866200ca9e76288cf0bcbb034e4e6c3ce7af (diff) | |
download | onionshare-dafe57cdef76a20d11e33c521fcfc06161dcb0c0.tar.gz onionshare-dafe57cdef76a20d11e33c521fcfc06161dcb0c0.zip |
When you hit an upload_error, alert the user
-rw-r--r-- | onionshare/web/receive_mode.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/onionshare/web/receive_mode.py b/onionshare/web/receive_mode.py index 15b79486..1550fab8 100644 --- a/onionshare/web/receive_mode.py +++ b/onionshare/web/receive_mode.py @@ -82,7 +82,14 @@ class ReceiveModeWeb(object): if request.upload_error: self.common.log('ReceiveModeWeb', 'define_routes', '/upload, there was an upload error') + + self.web.add_request(self.web.REQUEST_ERROR_DATA_DIR_CANNOT_CREATE, request.path, { + "receive_mode_dir": request.receive_mode_dir + }) + print(strings._('error_cannot_create_data_dir').format(request.receive_mode_dir)) + flash('Error uploading, please inform the OnionShare user', 'error') + if self.common.settings.get('public_mode'): return redirect('/') else: |