Merge branch 'master' of https://github.com/owncloud/core
This commit is contained in:
commit
f17555285e
|
@ -67,7 +67,7 @@ if($source) {
|
|||
$result=OC_Filesystem::file_put_contents($target, $sourceStream);
|
||||
if($result) {
|
||||
$mime=OC_Filesystem::getMimetype($target);
|
||||
$eventSource->send('success', $mime);
|
||||
$eventSource->send('success', array('mime'=>$mime, 'size'=>OC_Filesystem::filesize($target)));
|
||||
} else {
|
||||
$eventSource->send('error', "Error while downloading ".$source. ' to '.$target);
|
||||
}
|
||||
|
|
|
@ -556,10 +556,12 @@ $(document).ready(function() {
|
|||
eventSource.listen('progress',function(progress){
|
||||
$('#uploadprogressbar').progressbar('value',progress);
|
||||
});
|
||||
eventSource.listen('success',function(mime){
|
||||
eventSource.listen('success',function(data){
|
||||
var mime=data.mime;
|
||||
var size=data.size;
|
||||
$('#uploadprogressbar').fadeOut();
|
||||
var date=new Date();
|
||||
FileList.addFile(localName,0,date,false,hidden);
|
||||
FileList.addFile(localName,size,date,false,hidden);
|
||||
var tr=$('tr').filterAttr('data-file',localName);
|
||||
tr.data('mime',mime);
|
||||
getMimeIcon(mime,function(path){
|
||||
|
|
Loading…
Reference in New Issue