1
0
Fork 0

create workaround for not working php

Strings:getBytesFromShorthand

i created a js-function which converts integer, k, m and g to MB
Just remove this code, when we found out, why Strings is in some files
not working.
This commit is contained in:
Jakobus Schürz 2023-03-14 00:34:50 +01:00
commit 3688196859
9 changed files with 50 additions and 12 deletions

View file

@ -96,11 +96,12 @@
</div>
</div>
<script>
// getMByte() is from view/theme/frio/js/dropzone-frio.js
// to workaround dysfunctional php Strings:getBytesFromShorthand
Dropzone.autoDiscover = false;
var maxis = {{$max_imagesize}} / 10^6;
var dropzoneCompose = new Dropzone( '#comment-edit-form-{{$id}}', {
paramName: "userfile", // The name that will be used to transfer the file
maxFilesize: maxis, // MB
maxFilesize: getMBytes('{{$max_imagesize}}'), // MB
previewsContainer: '#dz-previewsCompose',
preventDuplicates: true,
clickable: true,