app/javascript/beyond_canvas/initializers/inputs.js in beyond_canvas-0.16.2.pre vs app/javascript/beyond_canvas/initializers/inputs.js in beyond_canvas-0.17.0.pre
- old
+ new
@@ -7,10 +7,13 @@
$input.on('change', function (e) {
var fileName = '';
if (this.files && this.files.length > 1)
- fileName = (this.getAttribute('data-multiple-caption') || '').replace('{count}', this.files.length);
+ fileName = (this.getAttribute('data-multiple-caption') || '').replace(
+ '{count}',
+ this.files.length
+ );
else if (e.target.value) fileName = e.target.value.split('\\').pop();
if (fileName)
$label.html(
`<svg class="input__file__icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15 2v5h5v15h-16v-20h11zm1-2h-14v24h20v-18l-6-6z"/></svg>${fileName}`