Skip to content

How to get original file with formidable? #616

Closed
@TayPark

Description

@TayPark

Support plan

  • which support plan is this issue covered by? (e.g. Community, Sponsor, or
    Enterprise):
  • is this issue currently blocking your project? (yes/no):
  • is this issue affecting a production system? (yes/no):

Context

  • node version: (nodenv) 12.14.1
  • module (formidable) version: latest
  • environment (e.g. node, browser, native, OS): WSL2, Ubuntu 18.04 LTS
  • used with (i.e. popular names of modules): express
  • any other relevant information: -

What problem are you trying to solve?

Hello again. I have to resize(with sharp) image from formidable, how to get this? Should I save file before resize it?

All I want is here. parse req and resize immediately.

form.parse(req, (err, fields, files) => {
  Array.isArray(files.imgFile) ? resize.generateThumbnail(files.imgFile[0]) : resize.generateThumbnail(files.imgFile)
// 
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions