@webnativellc/capacitor-filesharer
Version:
Capacitor plugin to download and share files for the Web, Android and iOS
36 lines (35 loc) • 846 B
TypeScript
export interface FileSharerPlugin {
/**
* Share a file using the native share dialog on Android and iOS and download the file on Web.
* @param {ShareFileOptions} options
* @returns {Promise<void>}
*/
share(options: ShareFileOptions): Promise<void>;
}
export interface ShareFileOptions {
/**
* The filename with a extension.
*/
filename: string;
/**
* The base64 encoded data or capacitor file url.
*/
base64Data?: string;
/**
* The local path you can find the file
*/
path?: string;
/**
* The content type of the provided data.
*/
contentType: string;
/**
* Custom options for the platform "android"
*/
android?: {
/**
* Override the default share sheet title
*/
chooserTitle: string;
};
}