@capgo/capacitor-file-sharer
Overview
Section titled “Overview”Share and save files from base64 data or local paths across Android, iOS, and Web
Start with share() and the other core methods listed below.
Platform support
Section titled “Platform support”| Platform | Support | Notes |
|---|---|---|
| iOS | Yes | Native |
| Android | Yes | Native |
| Web | Yes | Downloads files in the browser |
Core Capabilities
Section titled “Core Capabilities”share- Open the native share sheet on Android and iOS, or download the file on Web.save- Save into Android public collections, open the iOS save/share sheet, or download on Web.getPluginVersion- Return the native/web plugin implementation version.
Platform Behavior
Section titled “Platform Behavior”| Platform | Share behavior | Save behavior |
|---|---|---|
| Android | Uses a FileProvider, ClipData, and URI grants so chooser previews and thumbnails can read the file. | Uses MediaStore on Android 10+ and public directories on Android 9 and below. |
| iOS | Uses UIActivityViewController with base64 or direct path-backed files. | Opens the native share sheet so the user can choose Save to Files or another destination. |
| Web | Downloads the file. | Downloads the file. |
Public API
Section titled “Public API”| Method | Description |
|---|---|
share | Share a file using the native share sheet on Android and iOS, or download on Web. |
save | Save a file locally on Android/Web, or open the iOS save/share sheet. |
getPluginVersion | Returns the platform implementation version marker. |
Source Of Truth
Section titled “Source Of Truth”This reference is synced from src/definitions.ts in capacitor-file-sharer.
Keep going from @capgo/capacitor-file-sharer
Section titled “Keep going from @capgo/capacitor-file-sharer”If you are using @capgo/capacitor-file-sharer to plan storage and file handling, connect it with Using @capgo/capacitor-file-sharer for the native capability in Using @capgo/capacitor-file-sharer, @capgo/capacitor-data-storage-sqlite for the implementation detail in @capgo/capacitor-data-storage-sqlite, Using @capgo/capacitor-data-storage-sqlite for the native capability in Using @capgo/capacitor-data-storage-sqlite, @capgo/capacitor-file for the implementation detail in @capgo/capacitor-file, and Using @capgo/capacitor-file for the native capability in Using @capgo/capacitor-file.