I
I
Indiftech2021-01-14 18:00:08
JavaScript
Indiftech, 2021-01-14 18:00:08

How to limit possible extensions to be loaded by the client in JS?

The site has

How to make it so that on the html page it is possible to load files only with JSON extensions?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Yakimchuk, 2021-01-14
@yakimchuk-ry

On the client, we do not intervene in the file, so only the server can really filter out invalid files.
Therefore, on the client, you do not allow files to be uploaded by extensions (filter), and on the server you do the rest of the validation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question