I am using a file input html element for file upload.
<input type="file" name="data[File][0][attachment]" accept="application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf"style="display:inline;width:70%% !important;" class="file-upload" />
I know that for:
application/pdf
application/vnd.openxmlformats-officedocument.wordprocessingml.document
I need to add .eml into the accept
attribute as well
How do I find out for .eml file type?
I tried application/eml
it didn't work.
Looks like .eml
files have no mime type. It's not listed here http://www.iana.org/assignments/media-types/media-types.xhtml.
But since the accept
attribute accept both mime types and file extensions, you can add .eml
to it's value. Try this
<input type="file" name="data[File][0][attachment]" accept="application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf,.eml"style="display:inline;width:70%% !important;" class="file-upload" />