Skip to main content

Multi-File Preview

iOS & Web

previewFiles is available on iOS and web. On Android, use previewFile to open files one at a time. On web, each URI opens in its own browser tab instead of a swipeable gallery.

Open multiple files in a swipeable gallery using previewFiles:

await ExpoQuickLook.previewFiles({
uris: ['/path/to/file1.pdf', '/path/to/file2.png', '/path/to/file3.txt'],
initialIndex: 0,
editingMode: 'disabled',
});

Options​

OptionTypeDefaultDescription
urisstring[]requiredArray of file paths or URLs
initialIndexnumber0Which file to show first
editingModeEditingMode'disabled'Editing mode for all files
requestOptionsRequestOptions—Headers for remote downloads

Users can swipe left/right to navigate between files. The QuickLook controller shows a page indicator and supports the share button for each file.

Mixing Local and Remote Files​

You can mix local paths and remote URLs in the same list:

await ExpoQuickLook.previewFiles({
uris: [
'/local/path/file.pdf',
'https://example.com/remote.pdf',
],
});

Remote files are downloaded before the preview opens.