From 335b2f40a631f7188ab921d69289acaf31908c6e Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 10 Dec 2013 15:32:48 +0100 Subject: 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 --- apps/files/js/file-upload.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apps/files/js/file-upload.js') 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; } -- cgit v1.2.3