Giter VIP home page Giter VIP logo

Comments (7)

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

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.

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

Also, you need to set MagicFilePath property.
e.x:
Mime.MagicFilePath = "/path/to/magic.mgc";

from mime.

monotore avatar monotore commented on May 27, 2024

I can't find a MagicFile property on Mime. I'm using version 1.1.0 from nuget.

from mime.

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

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.

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

@monotore Package has been updated.

from mime.

monotore avatar monotore commented on May 27, 2024

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.

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

From http://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=libmagic1&searchon=names

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)

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.