summaryrefslogtreecommitdiffstats
path: root/apps/files/js/file-upload.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-12-10 15:32:48 +0100
committerVincent Petry <pvince81@owncloud.com>2013-12-12 10:38:12 +0100
commit335b2f40a631f7188ab921d69289acaf31908c6e (patch)
tree144c2f7233a0b27b6cae5fc0a81f817b968770f1 /apps/files/js/file-upload.js
parent3084a52a970c83ca35135f490b9bcb06b9900867 (diff)
downloadnextcloud-server-335b2f40a631f7188ab921d69289acaf31908c6e.tar.gz
nextcloud-server-335b2f40a631f7188ab921d69289acaf31908c6e.zip
Fixed download file from URL error messages
- L10N now converted to string to make them work with json_encode - Added specific error message when server doesn't allow fopen on URLs - Fixed client side to correctly show error message in a notification - Added OCP\JSON::encode() method to encode JSON with support for the OC_L10N_String values
Diffstat (limited to 'apps/files/js/file-upload.js')
-rw-r--r--apps/files/js/file-upload.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index e9663353f74..196817432d5 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -658,7 +658,12 @@ $(document).ready(function() {
});
eventSource.listen('error',function(error) {
$('#uploadprogressbar').fadeOut();
- alert(error);
+ var message = (error && error.message) || t('core', 'Error fetching URL');
+ OC.Notification.show(message);
+ //hide notification after 10 sec
+ setTimeout(function() {
+ OC.Notification.hide();
+ }, 10000);
});
break;
}