communicate size of newly created file back and update UI
This commit is contained in:
parent
7279a07ca2
commit
57f7ff2dbd
|
@ -93,9 +93,11 @@ if($source) {
|
|||
$meta = \OC\Files\Filesystem::getFileInfo($target);
|
||||
$id = $meta['fileid'];
|
||||
$mime = $meta['mimetype'];
|
||||
$size = $meta['size'];
|
||||
OCP\JSON::success(array('data' => array(
|
||||
'id' => $id,
|
||||
'mime' => $mime,
|
||||
'size' => $size,
|
||||
'content' => $content,
|
||||
)));
|
||||
exit();
|
||||
|
|
|
@ -258,8 +258,10 @@ $(document).ready(function() {
|
|||
var date=new Date();
|
||||
FileList.addFile(name,0,date,false,hidden);
|
||||
var tr=$('tr').filterAttr('data-file',name);
|
||||
tr.attr('data-size',result.data.size);
|
||||
tr.attr('data-mime',result.data.mime);
|
||||
tr.attr('data-id', result.data.id);
|
||||
tr.find('.filesize').text(humanFileSize(result.data.size));
|
||||
getMimeIcon(result.data.mime,function(path){
|
||||
tr.find('td.filename').attr('style','background-image:url('+path+')');
|
||||
});
|
||||
|
|
|
@ -365,7 +365,9 @@ $(document).ready(function() {
|
|||
FileList.addFile(name,0,date,false,hidden);
|
||||
var tr=$('tr').filterAttr('data-file',name);
|
||||
tr.attr('data-mime',result.data.mime);
|
||||
tr.attr('data-size',result.data.size);
|
||||
tr.attr('data-id', result.data.id);
|
||||
tr.find('.filesize').text(humanFileSize(result.data.size));
|
||||
getMimeIcon(result.data.mime,function(path){
|
||||
tr.find('td.filename').attr('style','background-image:url('+path+')');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue