Comments (5)
Database with file signatures magic.mgc should be placed along with libmagic-1.so(/bin/ or runtimes/linux-x64/native/ directories). It depends on how you publish the application.
Also, it can be set via setter MimeGuesser.MagicFilePath:
MimeGuesser.MagicFilePath = "/path/to/magic/file/magic.mgc";
But it seems like you are use 3.3.0 version. So, try to install latest package, it should works out of box.
from mime.
The base NsfwSpy project is just a class library so when I either publish or pack it, the magic.mgc and libmagic-1.so files aren't being included in the .nupkg file or the release folders. However when adding the NsfwSpy package to a project (e.g. an empty console application), the Mime package also gets installed due to being a dependency.
In that test console app, I can see the magic.gc and libmagic-1.so files in the ConsoleApp/bin/Debug/net6.0/runtimes/linux-x64/native/ folder. So not quite sure why Mime isn't picking them up.
from mime.
This is because before 3.4.0 library check database only inside directory where is Mime.dll placed.
In latest version it search magic.mgc inside runtime/{RID}/native too. This should be cover situations when application published without specify target runtime.
from mime.
Cool, I'll have a go with 3.4.0 and see how it goes. Thanks for the help so far.
from mime.
Yep, version 3.4.0 fixed it. Sorry for not trying this to start with.
Thanks for the help!
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
- 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.