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.

[Error: Unsupported MIME type: application/octet-stream]

See original GitHub issue

hi , I have got this error when I try to resize uploaded picture . I print out the file object I try to resize.

avatarFile  is  { fieldname: 'avatar',
  originalname: 'IMG_3242.jpg',
  name: 'ae08b661d41e2cc9bac647765a9f2aed.jpg',
  encoding: '7bit',
  mimetype: 'image/jpeg',
  path: '/var/folders/sd/l6z16nv17txfs7n_x0v2r8r40000gn/T/ae08b661d41e2cc9bac647765a9f2aed.jpg',
  extension: 'jpg',
  size: 652690,
  truncated: false,
  buffer: null }

and when I read avatarFile , I got [Error: Unsupported MIME type: application/octet-stream] , do u hv any idea about this issue? thanks

jimp.read(avatarFile.path ,function(err,image){
  ...
})

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

12reactions
pota92commented, Jan 14, 2016

Hello, Not the same but something similar here: .write() will throw this error when the folder path doesn’t exist. It also happens when i try to write a filename without extension. I’m just making sure that the folder path is created. Have you tried fs.exists() on that path? maybe it’s a permission problem. Greetings

2reactions
vincasltcommented, Nov 4, 2017

This problem is relevant when you have a buffer that you want to save, and you know mimetype, but don’t have the file name. For example when you receive form data in a http endpoint. I used multer for that, and it provides me with buffer and mimetype, so I could set it manually, but there is no config or method for that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do I get the error "Response has unsupported MIME type ...
wasm file is being set to application/octet-stream when the browser expects it to be application/wasm . I am using a simple express server...
Read more >
The script has an unsupported MIME type ('application/octet ...
The script has an unsupported MIME type ('application/octet-stream'). ... wp settings but i get this error in console and nor pwa or onesignal...
Read more >
Support for application/octet-stream MIME Attachment (Binary ...
A MIME attachment with the content type application/octet-stream is a binary file. Typically, it is an application or a document that is opened...
Read more >
Unsupported MIME type application/octet-stream
A MIME attachment with the content type "application/octet-stream" is a binary file. Typically, it will be an application or a document that must...
Read more >
Properly configuring server MIME types - MDN Web Docs
application /octet-stream for binary files where user action is expected. Server default configurations vary wildly and set different default ...
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