summaryrefslogtreecommitdiffstats
path: root/apps/files/js/file-upload.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js/file-upload.js')
-rw-r--r--apps/files/js/file-upload.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 1e6ab74fb6d..e9b07518bab 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -227,7 +227,7 @@ $(document).ready(function() {
$(this).data('text',text);
$(this).children('p').remove();
var form=$('<form></form>');
- var input=$('<input>');
+ var input=$('<input type="text">');
form.append(input);
$(this).append(form);
input.focus();
@@ -268,8 +268,9 @@ $(document).ready(function() {
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+')');
+ var path = getPathForPreview(name);
+ lazyLoadPreview(path, result.data.mime, function(previewpath){
+ tr.find('td.filename').attr('style','background-image:url('+previewpath+')');
});
} else {
OC.dialogs.alert(result.data.message, t('core', 'Error'));
@@ -330,8 +331,9 @@ $(document).ready(function() {
var tr=$('tr').filterAttr('data-file',localName);
tr.data('mime',mime).data('id',id);
tr.attr('data-id', id);
- getMimeIcon(mime,function(path){
- tr.find('td.filename').attr('style','background-image:url('+path+')');
+ var path = $('#dir').val()+'/'+localName;
+ lazyLoadPreview(path, mime, function(previewpath){
+ tr.find('td.filename').attr('style','background-image:url('+previewpath+')');
});
});
eventSource.listen('error',function(error){
@@ -346,4 +348,5 @@ $(document).ready(function() {
$('#new>a').click();
});
});
+ window.file_upload_param = file_upload_param;
});