Selection of two files with Input type file

Asked

Viewed 30 times

-1

inserir a descrição da imagem aqui

I have this following situation, I have these two files to upload with input type file.

But here’s the rule. I can only present to the user the files that have the SHP extension

Where it can select is to magically make selection of DBF file, so that he can upload the two files.

Without it making two click, but only one.

Obs: I have to keep the DBF file hidden.

There’s a way I can do this using ("React", "Javascript" and "HTML").

1 answer

-3


Well, javascript has its limitations so you don’t have access to the file path because it generates a fake path

but vc can do a workaround by letting the user select the folder, ai vc makes an arquvio extension filter, or you can choose to use activeX

<input type="file" id="ctrl" webkitdirectory directory multiple/>

an example here https://jsfiddle.net/yfzhvbdm/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.