export default async function fileInputCall() {
    const uploadResult = await chayns.uploadCloudImage();
    const type = uploadResult.url.match(/(\.[a-z]+)/g)[0];
    const response = await fetch(uploadResult.url);
    const data = await response.blob();
    const metadata = {
        type: `image/${type}`,
    };
    const file = new File([data], `androidCompatibilityUpload${type}`, metadata);

    return { target: { files: [file] } }; // compatibility event
}

@@ -109,20 +109,23 @@
   const 
-type
+matches
  = uploa
@@ -160,11 +160,89 @@
 )/g)
-%5B0%5D
+;%0A    const type = (matches && matches.length) ? matches%5Bmatches.length - 1%5D : ''
 ;%0A  
@@ -381,16 +381,25 @@
 e/$%7Btype
+.slice(1)
 %7D%60,%0A    

Fix compatibility file-input call