0

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?


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?

Alfred Huang
  • 17,654
  • 32
  • 118
  • 189

1 Answers1

1

Simply do this:

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

Zheng Bowen
  • 339
  • 2
  • 7