summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-10-10 15:54:00 +0200
committerVincent Petry <pvince81@owncloud.com>2013-10-10 15:54:00 +0200
commite2a4417079c2ddd1263ec9af2d2930eb65e911f7 (patch)
treebb061363b5acffefe29c9de08fd38f5aa02fd1fb
parente276ffedd3d979c43067c53dd87e8024cd782352 (diff)
downloadnextcloud-server-e2a4417079c2ddd1263ec9af2d2930eb65e911f7.tar.gz
nextcloud-server-e2a4417079c2ddd1263ec9af2d2930eb65e911f7.zip
Fixed conflict dialog in IE8
- Fixed JS error that prevent the conflict dialog to open #5060 - Fixed JS error that prevented the overwrite case to run
-rw-r--r--apps/files/js/file-upload.js6
-rw-r--r--core/js/oc-dialogs.js2
2 files changed, 6 insertions, 2 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index f1ef485fc3d..eb42d604ed3 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -124,7 +124,11 @@ OC.Upload = {
*/
onReplace:function(data){
this.log('replace', null, data);
- data.data.append('resolution', 'replace');
+ if (data.data){
+ data.data.append('resolution', 'replace');
+ } else {
+ data.formData.push({name:'resolution',value:'replace'}); //hack for ie8
+ }
data.submit();
},
/**
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js
index e5e9f6dbb7d..a9b40918ca7 100644
--- a/core/js/oc-dialogs.js
+++ b/core/js/oc-dialogs.js
@@ -234,7 +234,7 @@ var OCdialogs = {
var getCroppedPreview = function(file) {
var deferred = new $.Deferred();
// Only process image files.
- var type = file.type.split('/').shift();
+ var type = file.type && file.type.split('/').shift();
if (window.FileReader && type === 'image') {
var reader = new FileReader();
reader.onload = function (e) {