summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-09-22 23:24:24 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-09-22 23:25:23 +0200
commit917ea58a8c8191494ce0bd9fe15a547523c6fc37 (patch)
treef3110b7f6f07f58bc039fff5cce6a657b2abf40d /files
parentaad62919da232e94bdf2b02b86990422463b1270 (diff)
downloadnextcloud-server-917ea58a8c8191494ce0bd9fe15a547523c6fc37.tar.gz
nextcloud-server-917ea58a8c8191494ce0bd9fe15a547523c6fc37.zip
fix file uploads for IE
Diffstat (limited to 'files')
-rw-r--r--files/js/files.js25
1 files changed, 17 insertions, 8 deletions
diff --git a/files/js/files.js b/files/js/files.js
index 7b37837d9cc..8289d418e69 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -163,8 +163,10 @@ $(document).ready(function() {
var files=this.files;
var target=form.children('iframe');
var totalSize=0;
- for(var i=0;i<files.length;i++){
- totalSize+=files[i].size;
+ if(files){
+ for(var i=0;i<files.length;i++){
+ totalSize+=files[i].size;
+ }
}
if(totalSize>$('#max_upload').val()){
$( "#uploadsize-message" ).dialog({
@@ -192,13 +194,20 @@ $(document).ready(function() {
});
form.submit();
var date=new Date();
- for(var i=0;i<files.length;i++){
- if(files[i].size>0){
- var size=files[i].size;
- }else{
- var size=t('files','Pending');
+ if(files){
+ for(var i=0;i<files.length;i++){
+ if(files[i].size>0){
+ var size=files[i].size;
+ }else{
+ var size=t('files','Pending');
+ }
+ if(files){
+ FileList.addFile(files[i].name,size,date,true);
+ }
}
- FileList.addFile(files[i].name,size,date,true);
+ }else{
+ var filename=this.value.split('\\').pop(); //ie prepends C:\fakepath\ in front of the filename
+ FileList.addFile(filename,'Pending',date,true);
}
//clone the upload form and hide the new one to allow users to start a new upload while the old one is still uploading