Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to restrict the html upload file type to *.xmind?

Now I’m developing on an html page which wants to upload an XMind file (with extension name *.xmind).

I’m now making an <input type="file" /> element to upload the file.

But the accept type cannot restrict to the file type *.xmind, is there any solutions?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel


My effort:

Using accept="application/pdf" attribute can restrict the file type to *.pdf.

I searched about the MIME type of *.xmind, seemed to be application/x-xmind (Ref: https://www.digipres.org/formats/mime-types/).

But using accept="application/x-xmind" attribute is not working.

Any ideas?

>Solution :

Simply do this:

<input type="file" accept=".xmind">

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading