Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting extraneous console output "No file extension found, attempting mime typing." #29

Closed
alexdpoon opened this issue Aug 25, 2020 · 2 comments · Fixed by #45
Closed
Assignees

Comments

@alexdpoon
Copy link

I have a Buffer called imageBuffer that I know is an image/jpeg, so I make the call to image-hash like this:

const myHash = (await util.promisify(imageHash)({ ext: 'image/jpeg', data: imageBuffer }, 16, true)).toString()

It actually works just fine, but I don't like getting the extraneous console output "No file extension found, attempting mime typing." I feel like it shouldn't output that, particularly since I passed in the ext.

@alexdpoon
Copy link
Author

Not a rush, as I did find a workaround by adding a name with the .jpg extension. I shouldn't need to do that, but it works.

const myHash = (await util.promisify(imageHash)({ name: 'image.jpg', ext: 'image/jpeg', data: imageBuffer }, 16, true)).toString()

@danm
Copy link
Owner

danm commented May 3, 2022

I've hidden this log by default now.

@danm danm closed this as completed May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants