mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-30 09:46:15 -05:00
When you hit an upload_error, alert the user
This commit is contained in:
parent
5901866200
commit
dafe57cdef
@ -82,7 +82,14 @@ class ReceiveModeWeb(object):
|
|||||||
|
|
||||||
if request.upload_error:
|
if request.upload_error:
|
||||||
self.common.log('ReceiveModeWeb', 'define_routes', '/upload, there was an 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')
|
flash('Error uploading, please inform the OnionShare user', 'error')
|
||||||
|
|
||||||
if self.common.settings.get('public_mode'):
|
if self.common.settings.get('public_mode'):
|
||||||
return redirect('/')
|
return redirect('/')
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user