We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 918cf92 commit 6cf3c74Copy full SHA for 6cf3c74
index.ts
@@ -365,7 +365,7 @@ export default class UploadPlugin extends AdminForthPlugin {
365
return { error: `Record with id ${recordId} not found` };
366
}
367
368
- attachmentFiles = this.options.generation.attachFiles({ record, adminUser });
+ attachmentFiles = await this.options.generation.attachFiles({ record, adminUser });
369
// if files is not array, make it array
370
if (!Array.isArray(attachmentFiles)) {
371
attachmentFiles = [attachmentFiles];
types.ts
@@ -131,7 +131,7 @@ export type PluginOptions = {
131
attachFiles?: ({ record, adminUser }: {
132
record: any,
133
adminUser: AdminUser,
134
- }) => string[],
+ }) => string[] | Promise<string[]>,
135
136
137
/**
0 commit comments