I am presently constructing a easy picture add for a web site, however I encountered an issue the place evidently the change
occasion after deciding on the information doesn’t get triggered after information choice if one .heif file is current.
AFAIK with settle for="picture/*"
the picture needs to be transformed to a jpg
, however simply nothing occurs.
I used for testing the IOS Simulator Photographs, which incorporates one .heif picture in its default gallery.
Minimal instance:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta identify="viewport" content material="width=device-width, initial-scale=1.0">
<title>File Add Check</title>
</head>
<physique>
<h1>File Add Check</h1>
<enter kind="file" id="fileInput" a number of settle for="picture/*">
<script>
operate onUploadFunction() {
alert('File(s) chosen.');
}
const fileInput = doc.getElementById('fileInput');
fileInput.addEventListener('change', onUploadFunction);
</script>
</physique>
</html>