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.

Upload -- size limitation

See original GitHub issue

Hi all, is there a reason why multer won’t upload a file that’s more than 1MB? Here’s how multer is set up in my node server (using coffee script):

storerOption         =
    destination: (req, file, cb) ->
        cb null, './uploads'
    filename: (req, file, cb) ->
        cb null, (file.originalname.split(" ")).join('')
limitOption =
    fileSize: 52428800
storer               = multer.diskStorage storerOption
uploader             = multer({ storage: storer, limits: limitOption })

app = express()
app.use(bodyParser.json({limit: '50mb'}))
app.use(bodyParser.urlencoded({limit: '50mb', extended: false}))

Did I get anything wrong?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

60reactions
endze1tcommented, Jul 13, 2018

If you are using nginx, you could try to add to your nginx config:

client_max_body_size 50M;

Default value is 1M

3reactions
AlfreddGcocommented, Feb 10, 2019

I have added 50 * 1024 * 1024 to fileSize and to fieldSize and my image is uploaded but it is cropped almost all the bottom part and it ends up being 195.7kB long (not even 1MB) does someone have the same issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Increase Maximum File Upload Size in WordPress
Generally, the maximum upload size in WordPress ranges from 2MB to 150MB, depending on your web hosting settings. Your hosting provider usually ...
Read more >
How to Increase the Max Upload Size in WordPress - Kinsta
The default max upload file size at Kinsta is set to 128 MB. To verify this, go to your WordPress site's Media Library....
Read more >
Understand the Maximum File Size You Can Upload to Box
The maximum file size limit for uploads to Box varies depending on your account type: Free personal: 250 MB Starter: 2 GB Business:...
Read more >
How to Increase the Maximum File Upload Size in WordPress
Your hosting provider defines this limit, and it usually ranges from 2MB to 500MB. For most WordPress website owners, this limit will be...
Read more >
What is the Dropbox file size limit?
Files uploaded to dropbox.com must be 50 GB or smaller. All files uploaded to your Dropbox must be smaller than your storage space....
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