question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sorting

  • I’m submitting a …

    • bug report
    • feature request
    • support request
  • I confirm that I

    • used the search to make sure that a similar issue hasn’t already been submit

Expected Behavior

Have the ability to pass multer opts

Current Behavior

Currently I’m not able to pass any of the multer opts. In my current use case, requests are failing on “Field value too long” - which can be handled by increasing multer limits

My code looks like this:

  public async myFunc(
        @Request() request: ExpressRequest,
        @UploadedFile() logo: Express.Multer.File,
        @FormField('top') topRaw: Top,
        @FormField('left') leftRaw: Left
    ): Promise<void> {
       
        ...
    }

Possible Solution

@UploadedFile(opts) logo: Express.Multer.File

Steps to Reproduce

Context (Environment)

Version of the library: 3.8.0 Version of NodeJS: 14

  • Confirm you were using yarn not npm: [X]

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mayankchutanicommented, Apr 19, 2022

Is there a good example somewhere for a multipart file upload controller definition?

Also, the documentation says Express.Multer.File. What is Express here? Is it import Express from 'express' or something like that?

0reactions
WoHcommented, Dec 8, 2021

We can fix this in the 4.x releases, which are currently in alpha, with a breaking change, good (and important) catch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

expressjs/multer: Node.js middleware for handling ... - GitHub
multer (opts). Multer accepts an options object, the most basic of which is the dest property, which tells Multer where to upload the...
Read more >
multer - npm
Middleware for handling `multipart/form-data`.. Latest version: 1.4.5-lts.1, last published: 7 months ago. Start using multer in your ...
Read more >
Multer: Easily upload files with Node.js and Express
Multer is a Node.js middleware for handling multipart/form-data that makes the otherwise painstaking process of uploading files in Node.js ...
Read more >
Uploading Files Using Multer in a Node.js Application
Multer is an npm package that makes it easy to handle file uploads. It does it very efficiently, thus it is quite popular....
Read more >
File upload with multer in node.js and express - Medium
The documentation states: “Multer is a node.js middleware for handling multipart/form-data , which is primarily used for uploading files. It is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found