Skip to content

@capgo/capacitor-file-sharer

Share and save files from base64 data or local paths across Android, iOS, and Web

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.

PlatformSupportNotes
iOSYesNative
AndroidYesNative
WebYesDownloads files in the browser
  • 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.
PlatformShare behaviorSave behavior
AndroidUses 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.
iOSUses UIActivityViewController with base64 or direct path-backed files.Opens the native share sheet so the user can choose Save to Files or another destination.
WebDownloads the file.Downloads the file.
MethodDescription
shareShare a file using the native share sheet on Android and iOS, or download on Web.
saveSave a file locally on Android/Web, or open the iOS save/share sheet.
getPluginVersionReturns the platform implementation version marker.

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.