summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/js/files.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 824b04cebb0..ec2f159b4ca 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -361,7 +361,8 @@ $(document).ready(function() {
}
}else{
data.submit().success(function(data, status) {
- response = jQuery.parseJSON(data[0].body.innerText);
+ // in safari data is a string
+ response = jQuery.parseJSON(typeof data === 'string' ? data : data[0].body.innerText);
if(response[0] != undefined && response[0].status == 'success') {
var file=response[0];
delete uploadingFiles[file.name];