Capacitor plugin to allow file sharing on Android and iOS
npm install capacitor-plugin-filesharerbash
npm install capacitor-plugin-filesharer
npx cap sync
`
API
share(...)
* shareMultiple(...)
* Interfaces
$3
`typescript
share(opts: FileShareSingleOptions) => any
`Open share activity card with an attached base64Data
| Param | Type |
| ---------- | ------------------------------------------------------------------------- |
|
opts | FileShareSingleOptions |Returns: any
Since: 0.0.1
--------------------
$3
`typescript
shareMultiple(opts: FileShareMultiOptions) => any
`Open share activity with multiple base64Data strings
| Param | Type |
| ---------- | ----------------------------------------------------------------------- |
|
opts | FileShareMultiOptions |Returns: any
Since: 0.0.1
--------------------
$3
#### FileShareSingleOptions
| Prop | Type | Description |
| ------------ | ------------------- | ------------------------------- |
|
header | string | Title of the share window popup |
#### FileShareResult
| Prop | Type |
| ------------- | -------------------- |
|
result | boolean |
| message | string |
#### FileShareMultiOptions
| Prop | Type | Description |
| ------------ | ------------------- | ------------------------------- |
|
header | string | Title of the share window popup |
| files | {} | Array of files for uploading |
#### FileShareOptions
| Prop | Type | Description |
| ----------------- | ------------------- | -------------------------------------------------------------------- |
|
filename | string | Filename |
| base64Data | string | base64Data string |
| contentType` | string | Content type using FileShareContentType of string for advanced types |