Skip to content

TypeError: file.destroy is not a function #259

@alexconstantin

Description

@alexconstantin

Hello,

We sometimes get this error:

TypeError: file.destroy is not a function

  | 2020-11-13T13:01:02.147+02:00 | at Timeout.UploadTimer [as _onTimeout] (/app/node_modules/express-fileupload/lib/processMultipart.js:65:12)
  | 2020-11-13T13:01:02.147+02:00 | at ontimeout (timers.js:365:14)
  | 2020-11-13T13:01:02.147+02:00Copy at tryOnTimeout (timers.js:237:5) | at tryOnTimeout (timers.js:237:5)
  | 2020-11-13T13:01:02.147+02:00 | at Timer.listOnTimeout (timers.js:207:5)

We are using fileupload with this settings:
app.use(fileUpload({
uploadTimeout: 1000 * 60 * 10,
useTempFiles : true,
tempFileDir : '/tmp/',
preserveExtension: true,
debug: config.env !== 'prod'
}));

Is it something I am missing? Do you know any workarounds until this gets fixed?
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions