Closed dwelle closed 3 years ago
Some operating systems support extensions, some support MIME types, and some support both. It’s a recommended best practice to supply both for maximum compatibility. For example:
.jpeg, .jpg
image/jpeg
We have the same behavior in the <input type=file>
element: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-accept.
Thanks. I was also wrong it doesn't do anything, Excalidraw was just on an older version.
When calling
fileOpen
, AFAIK theextensions
doesn't really do anything on top ofmimeTypes
. At least on Windows (via Excalidraw) it does not.What is it supposed to do, and why do/should we supply both
mimeTypes
andextensions
?