diff --git a/ghost/admin/app/controllers/settings/labs.js b/ghost/admin/app/controllers/settings/labs.js index 04e86882b5..1864f45f68 100644 --- a/ghost/admin/app/controllers/settings/labs.js +++ b/ghost/admin/app/controllers/settings/labs.js @@ -54,6 +54,8 @@ export default Controller.extend({ yamlExtension: null, yamlMimeType: null, + yamlAccept: null, + init() { this._super(...arguments); this.importMimeType = IMPORT_MIME_TYPES; @@ -61,6 +63,9 @@ export default Controller.extend({ this.jsonMimeType = JSON_MIME_TYPE; this.yamlExtension = YAML_EXTENSION; this.yamlMimeType = YAML_MIME_TYPE; + // (macOS) Safari only allows files with the `yml` extension to be selected with the specified MIME types + // so explicitly allow the `yaml` extension. + this.yamlAccept = [...this.yamlMimeType, ...Array.from(this.yamlExtension, extension => '.' + extension)]; }, actions: { diff --git a/ghost/admin/app/templates/settings/labs.hbs b/ghost/admin/app/templates/settings/labs.hbs index 5f0041ab79..422c3bfe9f 100644 --- a/ghost/admin/app/templates/settings/labs.hbs +++ b/ghost/admin/app/templates/settings/labs.hbs @@ -206,7 +206,7 @@ {{/if}}