summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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) {