[Error: Unsupported MIME type: application/octet-stream]
See original GitHub issuehi , 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:
- Created 8 years ago
- Comments:16 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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.