Giter Site home page Giter Site logo

Comments (2)

AJMitev avatar AJMitev commented on September 24, 2024

You are not obligated to use "Extension" property from the result. The main goal here is to validate the type/container of the file and to protect yourself from invalid type/container. Since we cannot differentiate xlsx and docx from each other it is indifferent if the result contains one extension which is not right 50% of the time or if it contains an array of all possible extensions.

I hope this makes sense to you and If you have any suggestions how to solve that I will be more than happy to see it.

from filetypechecker.

miwojtkiewicz avatar miwojtkiewicz commented on September 24, 2024

Can I reopen this? I'm not sure what the best direction is for office files. My code is checking the extension of the file, but the validator will throw an error because the file types have matching sequences. You said in March that we're not obligated to use the Extension property, but you also throw an error if it's null. So what's the best route if I want to validate office / zip files that will all have the same sequence?

from filetypechecker.

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.