Pull files straight from cloud storage - no local copy needed
MultipleUpload v5 ships a pluggable remote-source registry. Built-in: Google Drive Picker (OAuth implicit flow, no server broker). Extend via MultipleUpload.registerRemoteSource(name, source) for Dropbox, OneDrive, Box, or any custom provider. Each picked file's download URL flows into the existing importFromUrl() server-side pipeline with NDJSON live-progress.
- Create a project at
console.cloud.google.com, enable the Picker API. - Create an API key + OAuth 2.0 Client ID (Web application). Add your origin to "Authorized JavaScript origins".
- Configure before instantiating:
MultipleUpload.configureRemoteSource('googledrive', { apiKey: 'YOUR_API_KEY', clientId: 'YOUR_OAUTH_CLIENT_ID' });
Registering a custom source
MultipleUpload.registerRemoteSource('dropbox', {
title: 'Dropbox',
icon: '<svg viewBox=...>...</svg>',
ready: () => !!window.Dropbox,
pick: (uploader) => new Promise((resolve, reject) => {
window.Dropbox.choose({
multiselect: true,
linkType: 'direct',
success: (files) => resolve(files.map(f => ({
url: f.link, fileName: f.name, fileSize: f.bytes
}))),
cancel: () => reject(new Error('cancelled'))
});
})
});
new MultipleUpload('#uploader', {
remoteSources: ['googledrive', 'dropbox']
});RemoteFile shape returned from pick()
{
url: 'https://www.googleapis.com/drive/v3/files/abc?alt=media',
fileName: 'quarterly-report.pdf',
fileSize: 2_457_600, // optional
contentType: 'application/pdf', // optional
headers: { 'Authorization': 'Bearer ya29...' } // optional (passed when fetching)
}RemoteSource interface (TypeScript)
interface RemoteSource {
title: string;
icon?: string; // SVG markup or img URL
pick(uploader: MultipleUpload, options?: any): Promise<RemoteFile | RemoteFile[]>;
ready?(): boolean; // false -> render disabled
configure?(config: Record<string, any>): void;
}Wire flow
- User clicks the source button in the uploader chrome.
- Adapter's
pick()runs - typically opens an OAuth popup + provider's native file picker. - On select -> resolves with a
RemoteFile(or array). - Each item is handed to
uploader.importFromUrl(url, { fileName, contentType, headers }). - Your server's
/import-urlendpoint fetches the URL (using any providedAuthorization) and streams through with NDJSON progress.
Built-in Google Drive: no server broker needed
Uses Google Picker + Identity Services. The browser opens the OAuth popup, gets an access token, passes it to Picker, then forwards the token as Authorization when your server fetches the file from Drive's REST API. The token never persists on your server - just the URL + the bearer.
Roadmap
- Built-in Dropbox + OneDrive adapters (same pattern as Drive) - coming in 5.1.
- Server-side OAuth broker for flows where the browser shouldn't see the token - opt-in via
remoteSourcesBroker: '/api/upload/remote-sources'.
This closes the biggest single feature gap vs Uppy - picking files from cloud storage was the marquee Companion feature.