diff --git a/demo/script.mjs b/demo/script.mjs index 8e823ee..46ee0b8 100644 --- a/demo/script.mjs +++ b/demo/script.mjs @@ -67,6 +67,7 @@ import { imageToBlob } from './image-to-blob.mjs'; openButton.addEventListener('click', async () => { try { const blob = await fileOpen({ + description: 'Image files', mimeTypes: ['image/jpg', 'image/png', 'image/gif', 'image/webp'], extensions: ['.jpg', '.jpeg', '.png', '.gif', '.webp'], }); @@ -82,6 +83,7 @@ import { imageToBlob } from './image-to-blob.mjs'; openMultipleButton.addEventListener('click', async () => { try { const blobs = await fileOpen({ + description: 'Image files', mimeTypes: ['image/jpg', 'image/png', 'image/gif', 'image/webp'], extensions: ['.jpg', '.jpeg', '.png', '.gif', '.webp'], multiple: true, diff --git a/package-lock.json b/package-lock.json index d8acbc0..42d891c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "browser-fs-access", - "version": "0.30.1", + "version": "0.30.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "browser-fs-access", - "version": "0.30.1", + "version": "0.30.2", "license": "Apache-2.0", "devDependencies": { "eslint": "^8.18.0", diff --git a/package.json b/package.json index 090838a..bf5af42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "browser-fs-access", - "version": "0.30.1", + "version": "0.30.2", "description": "File System Access API with legacy fallback in the browser.", "type": "module", "source": "./src/index.js", diff --git a/src/fs-access/file-open.mjs b/src/fs-access/file-open.mjs index df7478e..b8ca47d 100644 --- a/src/fs-access/file-open.mjs +++ b/src/fs-access/file-open.mjs @@ -32,7 +32,7 @@ export default async (options = [{}]) => { const types = []; options.forEach((option, i) => { types[i] = { - description: option.description || '', + description: option.description || 'Files', accept: {}, }; if (option.mimeTypes) { diff --git a/src/fs-access/file-save.mjs b/src/fs-access/file-save.mjs index 978584c..06a055c 100644 --- a/src/fs-access/file-save.mjs +++ b/src/fs-access/file-save.mjs @@ -45,7 +45,7 @@ export default async ( } options.forEach((option, i) => { types[i] = { - description: option.description || '', + description: option.description || 'Files', accept: {}, }; if (option.mimeTypes) {