master #13

Merged
m.lettere merged 13 commits from master into prod 2024-04-23 18:26:24 +02:00
1 changed files with 4 additions and 1 deletions
Showing only changes of commit f7cd0932b5 - Show all commits

View File

@ -524,7 +524,10 @@ class CCPFileInputWidgetController extends CCPBaseInputWidgetController {
encoded += '='.repeat(4 - (encoded.length % 4)); encoded += '='.repeat(4 - (encoded.length % 4));
} }
this.value[index] = encoded this.value[index] = encoded
this.querySelector("small[name=preview]").textContent = encoded.substr(0, 5) + "..." + encoded.substr(encoded.length - 5) this.querySelector("small[name=preview]").textContent =
encoded.length > 15 ? encoded.substring(0, 5) + "..." + encoded.substring(encoded.length - 5) : encoded
const newev = new Event("input", { bubbles : true})
this.dispatchEvent(newev)
}) })
reader.readAsDataURL(file) reader.readAsDataURL(file)
} }