You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/@awesome-cordova-plugins/plugins/imap/index.ts
+40-2Lines changed: 40 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -191,9 +191,13 @@ export interface Content {
191
191
*/
192
192
type: string;
193
193
/**
194
-
* Optional. The name of the file.
194
+
* The name of the file, if the message content is a file attachment.
195
195
*/
196
-
fileName?: string;
196
+
fileName: string;
197
+
/**
198
+
* Android ONLY. Optional. "contentID" is a unique identifier for the attachment, used to fetch the file. It is preferred over "fileName" when available.
199
+
*/
200
+
contentID?: string;
197
201
/**
198
202
* Message's content.
199
203
*/
@@ -454,6 +458,17 @@ export enum FlagEnum {
454
458
* console.error(error)
455
459
* });
456
460
*
461
+
* * Download Email Attachment
462
+
* * The 'contentID' (the last parameter) can be set to an empty string ('') or null if it's not provided.
* @param path {string} The file path where the attachment should be saved.
642
+
* @param replaceIfDuplicate {boolean} When set to true, duplicate attachments are overwritten, when set to false, the file name is modified by appending a suffix (e.g., file_name (1).type) to avoid overwriting.
643
+
* @param fileName {string} The name of the attachment to be downloaded.
644
+
* @param contentID {string} Optional parameter. Android ONLY. The "contentID" of the attachment to be downloaded. This parameter is preferred if available.
645
+
* @return {Promise<boolean>} Returns boolean status of the process.
0 commit comments