forked from MarseyWorld/MarseyWorld
android screenshot filenames are 14 characters
parent
ecf72de5a3
commit
e397a87cb4
|
@ -400,7 +400,7 @@ const input = document.getElementById('file')
|
||||||
function handle_files() {
|
function handle_files() {
|
||||||
if (!input.files.length) return
|
if (!input.files.length) return
|
||||||
if (check_file_size(input, input.files[0])) {
|
if (check_file_size(input, input.files[0])) {
|
||||||
const char_limit = innerWidth >= 768 ? 50 : 13;
|
const char_limit = innerWidth >= 768 ? 50 : 14;
|
||||||
input.previousElementSibling.className = "";
|
input.previousElementSibling.className = "";
|
||||||
input.previousElementSibling.textContent = input.files[0].name.substr(0, char_limit);
|
input.previousElementSibling.textContent = input.files[0].name.substr(0, char_limit);
|
||||||
|
|
||||||
|
|
|
@ -636,7 +636,7 @@ if (file_upload_or_edit) {
|
||||||
{
|
{
|
||||||
const file = file_upload_or_edit.files[0]
|
const file = file_upload_or_edit.files[0]
|
||||||
if (check_file_size(file_upload_or_edit, file)) {
|
if (check_file_size(file_upload_or_edit, file)) {
|
||||||
const char_limit = innerWidth >= 768 ? 50 : 13;
|
const char_limit = innerWidth >= 768 ? 50 : 14;
|
||||||
file_upload_or_edit.previousElementSibling.textContent = file.name.substr(0, char_limit);
|
file_upload_or_edit.previousElementSibling.textContent = file.name.substr(0, char_limit);
|
||||||
if (file.type.startsWith('image/')) {
|
if (file.type.startsWith('image/')) {
|
||||||
const fileReader = new FileReader();
|
const fileReader = new FileReader();
|
||||||
|
|
Loading…
Reference in New Issue