Comments (7)
If you use x64 Windows:
1). Download dll's from that repo https://github.com/pidydx/libmagicwin64
2). Bad way, but quickly:
Drop the dlls in C:\Windows\System32
Another way:
Place it into any directory and set MAGIC environment variable with /path/to/libmagic1.dll
For x86 Windows:
1). Download dll's from http://gnuwin32.sourceforge.net/packages/file.htm
2). Same for x64.
Later I can add a property to simplify this.
from mime.
Also, you need to set MagicFilePath property.
e.x:
Mime.MagicFilePath = "/path/to/magic.mgc";
from mime.
I can't find a MagicFile property on Mime. I'm using version 1.1.0 from nuget.
from mime.
This property added after 1.1.0 release.
I will update package soon.
As temporary solution place it into
$LOCALAPPDATA/.magic/magic.mgc
(not tested).
from mime.
@monotore Package has been updated.
from mime.
Thanks. Works perfect!
Do you know where to get an updatet magic.mgc file? The one in https://github.com/pidydx/libmagicwin64 is two years old.
from mime.
Download amd64 package and unpack it via 7zip or another archiver.
Magic files located in:
/usr/share/misc/magic
/usr/share/misc/magic.mgc
Also, check libmagic version via Magic.Version property. Newest version of this magic file cannot be supported by your libmagic.dll
I do not remember which version in the repo, but I think 5.2.0.
from mime.
Related Issues (20)
- 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
- Different extension compared to the `file` command HOT 2
- Different results on Linux and Windows
- HeyRed.Mime.MagicException: Could not find any valid magic files! on Windows Server 2012 R2 when program is on path with ů
- 3.6.0 - libmagic-1.dll flagged as virus HOT 1
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.