Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick fix for adminjs-upload plugin #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ivictbor
Copy link

During file upload adminjs-upload relays on file.path https://github.com/SoftwareBrothers/adminjs-upload/blob/master/src/features/upload-file/providers/aws-provider.ts#L66 which is not provided by fastifyMultipart. TO quickly fix it in our project I created a temporary file (in tmp folder, but is not being deleted) and substituted instead of file object

};

//@ts-ignore
Array.prototype.asyncMap = async function (callback) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extending native prototypes is a bad practice, please create a helper method for this or simply use Promise.all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants