I have a button to select multiple images multiple="multiple"
Selecting multiple images works everywhere, in all browsers. But it doesn’t work in Telegram Mini Apps on the phone https://core.telegram.org/bots/webapps. Selecting multiple images works in Telegram for desktop computers, but does not work in Mini Apps on the phone.
I’m talking about multiple. If you select one image at a time, it works.
I don’t know what the reason is.
html
<input type="file" (change)="selectFiles($event)" accept="image/jpeg, image/png" ultiple="multiple">
TypeScript
export class AddFormComponent {
selectFiles(event?: any) {
console.log(event.target.files.length) // 0 or event>0
}
}
Please tell me what is the reason and how to solve it?
2
Answers
I hope this helps!
Telegram Image Picker library to select multiple images in Telegram Mini Apps:
Another solution