1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

Add additional comment for Safari behaviour of input's accept property

This commit is contained in:
Brett Sun 2015-12-14 11:41:06 +01:00
parent d5823f10ec
commit 8f98251735

View File

@ -76,6 +76,7 @@ export function displayValidProgressFilesFilter(file) {
*/ */
export function transformAllowedExtensionsToInputAcceptProp(allowedExtensions) { export function transformAllowedExtensionsToInputAcceptProp(allowedExtensions) {
// Get the mime type of the extension if it's defined or add a dot in front of the extension // Get the mime type of the extension if it's defined or add a dot in front of the extension
// This is important for Safari as it doesn't understand just the extension.
let prefixedAllowedExtensions = allowedExtensions.map((ext) => { let prefixedAllowedExtensions = allowedExtensions.map((ext) => {
return MimeTypes[ext] || ('.' + ext); return MimeTypes[ext] || ('.' + ext);
}); });