Skip to content

@capgo/capacitor-uploader

Capacitor Uploader Plugin for uploading files with background support and progress tracking.

@capgo/capacitor-uploader moves large files off the device with native background uploads on iOS and Android. Progress and completion arrive through plugin events, so your UI can detach while uploads continue. Pair it with camera capture or filesystem paths instead of buffering whole files in the WebView.

Common uses: photo or video backup, presigned S3 uploads, multipart form posts with metadata fields, and resilient retries via maxRetries.

PlatformBackground uploadNotes
iOSYesBackground URLSession
AndroidYesForeground service style notification while uploading
WebWhile page openfetch based, no native background continuation

Web also supports IndexedDB style paths: idb://[database]/[collection]/[key].

  • startUpload - Start uploading a file to a server.
  • removeUpload - Cancel and remove an ongoing upload.
MethodDescription
startUploadStart uploading a file to a server.
removeUploadCancel and remove an ongoing upload.
addListenerListen for upload progress and status events.
getPluginVersionGet the native Capacitor plugin version.

This reference is synced from src/definitions.ts in capacitor-uploader.

If you are using @capgo/capacitor-uploader to plan storage and file handling, connect it with Using @capgo/capacitor-uploader for the native capability in Using @capgo/capacitor-uploader, @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.