Comments (3)
Temporarily solved like this:
var mimeType = "";
using (var file = File.Open(filePath, FileMode.Open, FileAccess.Read))
{
mimeType = MimeGuesser.GuessMimeType(file);
}
from mime.
The dev PC on linux/mac?
I don't know how to resolve this, because libmagic on Windows can handle only ASCII characters.
Anyway we can use these overloads:
GuessMimeType(byte[] buffer)
GuessMimeType(Stream stream)
from mime.
Dev PC:
- Windows 10 Pro
- Intel Core i5-6600
- NTFS
Prod:
- Windows Server 2016 Standard
- Intel Xeon E5-2650
- NTFS
If libmagic handle only ASCII chars, it is strange that it works on my Dev PC.
Thanks!
from mime.
Related Issues (20)
- Please add x86 support HOT 1
- Excel files are detected as "zip" HOT 9
- file type is detected Unknown HOT 8
- All SVG are identified as text/svg instead of text/svg+xml HOT 1
- Implement magic_list
- Building this project to net 4.5/x86 specification
- Update documentation to mention that magic_open isn't thread safe (new Magic()) HOT 12
- missing alpine linux x64 support HOT 1
- Unable to find libmagic-1 on Ubuntu 20.04 HOT 5
- linux-musl-x64 is missing from runtimeTargets HOT 4
- Libmagic not compatibile with Xamarin on mobile devices
- Different results using filePath vs stream input HOT 2
- Got error with visual studio 2015 HOT 3
- Update File to version 5.41 HOT 7
- libmagic dependency mismatch on MacOS Monterey (5.41) HOT 2
- "Could not find any valid magic files!" when included in a Nuget package HOT 5
- native lib for M1 Mac os HOT 15
- Update file to 5.44 HOT 5
- Does not pick up Parquet files HOT 2
- Copy native libs to correct build output directory for Azure Functions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mime.