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

mov file recognized differently in browser and in server code #211

Closed
yoavain-sundaysky opened this issue May 13, 2019 · 4 comments · Fixed by #214
Closed

mov file recognized differently in browser and in server code #211

yoavain-sundaysky opened this issue May 13, 2019 · 4 comments · Fixed by #214

Comments

@yoavain-sundaysky
Copy link

I'm using file-type in client code to determine content-type to use in request to server.
I'm using file-type in server code to make sure the content I get matches the content-type.
I used to get the same result, but today, after updating from 10.8.0 to 11.0.0 I got 2 different results:

Client:

{
  "ext": "mp4",
  "mime": "video/mp4"
}

Server:

{
  "ext": "mov",
  "mime": "video/quicktime"
}

Attached the file:
640x360_vid.zip

@yoavain-sundaysky yoavain-sundaysky changed the title mov file recognized differently in brower and in server code mov file recognized differently in browser and in server code May 13, 2019
@yoavain-sundaysky
Copy link
Author

BTW, after reverting to 10.8.0 both server and client result is:

{
  "ext": "mov",
  "mime": "video/quicktime"
}

@sindresorhus
Copy link
Owner

// @stroncium

@stroncium
Copy link
Contributor

@sindresorhus I have no idea how to test it in browser, and I suppose it will be a waste of time to learn how is building for browsers done just for this issue, but while running the code in my mind I've come up with #214, which fixes an issue existing in nodejs, and there is really high chance it is the issue @yoavain-sundaysky hit in browser.

@yoavain-sundaysky
Copy link
Author

Sorry for the late response.
I can confirm the problem is solved in 12.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants