Giter VIP home page Giter VIP logo

Comments (5)

hey-red avatar hey-red commented on May 27, 2024

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.

d00ML0rDz avatar d00ML0rDz commented on May 27, 2024

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.

image

from mime.

hey-red avatar hey-red commented on May 27, 2024

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.

d00ML0rDz avatar d00ML0rDz commented on May 27, 2024

Cool, I'll have a go with 3.4.0 and see how it goes. Thanks for the help so far.

from mime.

d00ML0rDz avatar d00ML0rDz commented on May 27, 2024

Yep, version 3.4.0 fixed it. Sorry for not trying this to start with.

Thanks for the help!

from mime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.