Loading HTML form for ODT / MIME files for * .odt

I'm looking for an HTML upload form for ODT files only. I need to know the parameter for accept

.

<form method="post" action="upload.php" >
      <input type="file" name="file_upload" accept="" />
      <button type="submit">Upload</button>
</form>

      

+3


source to share


1 answer


While searching stackoverflow, I found that I have to figure out the correct MIME type.

For ODT, the MIME type isapplication/vnd.oasis.opendocument.text




The HTML code should look like this:

<form method="post" enctype="multipart/form-data" action="upload.php" >
      <input type="file" name="file_upload" 
             accept="application/vnd.oasis.opendocument.text" />
      <button type="submit">Upload</button>
</form>

      

+1


source







All Articles