Skip to main content
@capgo/capacitor-uploader Files & Storage Open source

Uploader Capacitor plugin

Upload large files reliably in background with progress tracking and retry support

Install

bun add @capgo/capacitor-uploader bunx cap sync
npm, pnpm or yarn
  • npm install @capgo/capacitor-uploader
  • pnpm add @capgo/capacitor-uploader
  • yarn add @capgo/capacitor-uploader

Guide

How to use Uploader in Capacitor

Test on device

Download the Capgo app, then scan the QR code.

Uploader plugin preview QR code

Using @capgo/capacitor-uploader

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

Install

bun add @capgo/capacitor-uploader
bunx cap sync

What This Plugin Exposes

  • startUpload - Start uploading a file to a server.
  • removeUpload - Cancel and remove an ongoing upload.

Example Usage

startUpload

Start uploading a file to a server.

import { Uploader } from '@capgo/capacitor-uploader';

const { id } = await Uploader.startUpload({
  filePath: 'file:///path/to/file.jpg',
  serverUrl: 'https://example.com/upload',
  headers: {
    'Authorization': 'Bearer token'
  },
  method: 'POST',
  uploadType: 'multipart',
  fileField: 'photo'
});
console.log('Upload started with ID:', id);

removeUpload

Cancel and remove an ongoing upload.

import { Uploader } from '@capgo/capacitor-uploader';

await Uploader.removeUpload({ id: 'upload-123' });

Full Reference

Keep going from Using @capgo/capacitor-uploader

If you are using Using @capgo/capacitor-uploader to plan migration and enterprise operations, connect it with @capgo/capacitor-uploader for the implementation detail in @capgo/capacitor-uploader, Getting Started for the implementation detail in Getting Started, Capgo Enterprise for the product workflow in Capgo Enterprise, Ionic Enterprise Plugin Alternatives for the product workflow in Ionic Enterprise Plugin Alternatives, and Capgo Alternatives for the product workflow in Capgo Alternatives.

FAQ

Uploader plugin FAQ

How do I install the Uploader plugin in a Capacitor app?

Run "bun add @capgo/capacitor-uploader" (or "npm install @capgo/capacitor-uploader"), then run "bunx cap sync" so the iOS and Android projects pick up the native code. Import it from "@capgo/capacitor-uploader" in your app code.

Does @capgo/capacitor-uploader work with React, Vue and Angular?

Yes. Uploader is a Capacitor package, so it works with any web framework that runs inside Capacitor, including Ionic, React, Vue, Angular, Svelte and plain JavaScript.

Which Capacitor version does @capgo/capacitor-uploader support?

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

Is @capgo/capacitor-uploader free and open source?

Yes. The source code is public on GitHub at https://github.com/Cap-go/capacitor-uploader/ and the package is free to install from npm. Bug reports and pull requests are welcome.

Can I update code that uses Uploader without an App Store review?

Installing or upgrading the plugin changes native code, so it needs a new store build. After that, JavaScript, HTML and CSS changes that call the plugin can ship instantly with Capgo live updates.

Ship Uploader changes without waiting for app review

Once the plugin is in your store build, Capgo live updates push your JavaScript, HTML and CSS changes to users in minutes.

Start with Capgo