Alex Mi
Alex Mi

Reputation: 1459

<input accept="image/tif does not show *.tif files

I have the following HTML tag:

<input id="inputButton" name="buttonAdd" type="file" class="upload" accept="image/bmp, image/jpg, image/jpeg, image/png, image/tif, image/tiff, application/pdf" multiple/>

When I click on the button to select a file to upload, the available file types are initially filtered, as expected. The filter does show files with a *.TIFF extension, but it does not show files having only *.TIF extension (see the attached screenshot)

 .tif files are missing from the filter

I am using Internet Explorer 11 on Windows 7 and I MUST ALSO enable the functionality for *.TIF files.

Could somebody help me?

.*TIFF files showed, but *TIF files - not

Upvotes: 0

Views: 3476

Answers (1)

Aurel B&#237;l&#253;
Aurel B&#237;l&#253;

Reputation: 7981

accept

If the value of the type attribute is file, then this attribute will indicate the types of files that the server accepts, otherwise it will be ignored. The value must be a comma-separated list of unique content type specifiers:

  • A file extension starting with the STOP character (U+002E). (e.g. .jpg, .png, .doc).
  • A valid MIME type with no extensions.
  • [...]

Source: MDN

So in your case, you can do:

<input id="inputButton" name="buttonAdd" type="file" class="upload"
  accept="image/bmp, image/jpg, image/jpeg, image/png, image/tif,
  image/tiff, application/pdf, .tif" multiple/>

Upvotes: 2

Related Questions