Wrong file size when uploading documents #1556
This commit is contained in:
parent
22510b90fd
commit
e0482febbf
@ -22,6 +22,7 @@
|
||||
<%= hidden_field_tag "committed_files[#{i}][disk_filename]", upload.disk_filename %>
|
||||
<%= hidden_field_tag "committed_files[#{i}][token]", upload.token %>
|
||||
<%= hidden_field_tag "committed_files[#{i}][digest]", upload.digest %>
|
||||
<%= hidden_field_tag "committed_files[#{i}][size]", upload.size %>
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<p>
|
||||
@ -56,8 +57,8 @@
|
||||
<%= text_field_tag "committed_files[#{i}][mime_type]", h(upload.mime_type), readonly: true %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag "committed_files[#{i}][size]", l(:label_size) %>
|
||||
<%= text_field_tag "committed_files[#{i}][size]", number_to_human_size(upload.size), readonly: true %>
|
||||
<%= label_tag "committed_files[#{i}][human_size]", l(:label_size) %>
|
||||
<%= text_field_tag "committed_files[#{i}][human_size]", number_to_human_size(upload.size), readonly: true %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="splitcontentright">
|
||||
|
||||
@ -47,8 +47,8 @@
|
||||
<%= text_field_tag "committed_files[#{i}][mime_type]", upload.mime_type, readonly: true %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag "committed_files[#{i}][size]", l(:label_size) %>
|
||||
<%= text_field_tag "committed_files[#{i}][size]", number_to_human_size(upload.size), readonly: true %>
|
||||
<%= label_tag "committed_files[#{i}][human_size]", l(:label_size) %>
|
||||
<%= text_field_tag "committed_files[#{i}][human_size]", number_to_human_size(upload.size), readonly: true %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="splitcontentright">
|
||||
|
||||
@ -207,8 +207,10 @@ function dmsfAddFile(inputEl, file, eagerUpload) {
|
||||
detailsForm = detailsForm.replace('id="committed_files_' + attachmentId + '_title"',
|
||||
'id="committed_files_' + attachmentId + '_title" value = "' + filenameToTitle(file.name) + '"');
|
||||
// Size
|
||||
detailsForm = detailsForm.replace('id="committed_files_' + attachmentId + '_size"',
|
||||
'id="committed_files_' + attachmentId + '_size" value = "' + humanFileSize(file.size) + '"');
|
||||
detailsForm = detailsForm.replace('id="committed_files_' + attachmentId + '_human_size"',
|
||||
'id="committed_files_' + attachmentId + '_human_size" value = "' + humanFileSize(file.size) + '"');
|
||||
detailsForm = detailsForm.replace('id="committed_files_' + attachmentId + '_size" value="0"',
|
||||
'id="committed_files_' + attachmentId + '_size" value = "' + file.size + '"');
|
||||
// Mime type
|
||||
detailsForm = detailsForm.replace('id="committed_files_' + attachmentId + '_mime_type"',
|
||||
'id="committed_files_' + attachmentId + '_mime_type" value = "' + file.type + '"');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user