Feature Request: Support useTempFile for express-fileupload #746
BitPatty
started this conversation in
Feature Requests & Ideas
Replies: 1 comment 1 reply
-
Hey @BitPatty , thanks for the report. Since we used express-fileupload's TS type for I think this would be a great enhancement, though. I'll move this to discussions as a feature request. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bug Report
To avoid excessive memory usage for uploads
useTempFiles
for express-fileupload can be enabled in the payload config. This of course flushes the buffer on thereq.files.file
object on which payload is relying for resizing.Expected Behavior
useTempFiles
should not affect payloads upload mechanic.Current Behavior
Payload fails to process the image since it expects the whole image to be in a buffer.
Possible Solution
Check whether the temp file exists and do further processing based on this structure.
useTempFiles
is true. Depending on the source file and resizing options the memory usage is a real concern.Steps to Reproduce
upload.useTempFiles
totrue
in the payload configDetailed Description
Payload 0.19.2
payload/src/uploads/uploadFile.ts
Lines 59 to 87 in cac5266
Beta Was this translation helpful? Give feedback.
All reactions