Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 2.44 KB

Folder-Picking.md

File metadata and controls

37 lines (24 loc) · 2.44 KB

Picking a folder of ZIM archives

Simply visit pwa.kiwix.org in a modern browser. Read more after the demo:

Folder-picking demo

See also: [ PWA Installation demo ] [ File handling ] [ Demo of all OPFS features ]

Use the File System Access API or the Webkitdirectory API

All modern desktop browsers now allow you to pick a folder of ZIM archives and switch quickly between archives in the folder. Chromium browsers (e.g. Chrome, Edge) use the File System Access API to enable file and folder picking, and to remember the selected folder across app launches. Firefox uses the Webkitdirectory API to achieve a very similar effect as demoed above.

Why do I have to give permission again after relaunch?

This is a browser security feature. You can override it by using the Origin Private File System if available on your device and browser (see below). However, it's a very quick click or two in most browsers to authorize access, and once you give permission to access a folder, all the files in that folder become accessible with no further permission prompts.

If you want a version of the app that doesn't ask for permission prompts, try using the Origin Private File System -- it's very similar on mobile and desktop.

What about split ZIM archives?

If you have an archive made up of a set of split files (ending .zimaa, .zimab, .zimac, etc.), then simply pick the folder containing them. The app will only display the first part (.zimaa) in the archive list, but when you click on this, it will look for the other parts and launch the ZIM. If you are using a browser that doesn't support folder picking (e.g. IE11), then simply pick ALL the split parts, or alternatively, you can drag-and-drop the whole set into the app.

File Handling

In Chromium browsers, if you install the app, it can also take advantage of File handling. Together, these APIs provide a near-native experience..

See also: [ PWA Installation demo ] [ File handling ] [ Demo of all OPFS features ]