Comments (2)
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.
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)
- Renamed executable file does not detect as executable HOT 1
- Word Documents recognized as Zip files HOT 2
- System.InvalidOperationException: Can't search in collection with no items! HOT 2
- Async usage error on .NET 6 HOT 1
- Cannot recognize excel file HOT 2
- How to check if file type is supported? HOT 12
- .xlsx is recognized as .docx HOT 2
- Support for HEIC file type HOT 2
- Nuget package built with Debug mode HOT 1
- Zip file recognized as docx HOT 3
- OWASP dependency check fail for pkg:nuget/[email protected] HOT 1
- File Version of latest repository is version 1.0.0.0. HOT 1
- If you need more magic bytes HOT 1
- stream of dll reported as exe HOT 2
- Can you add the Byte parameter? HOT 5
- More intelligent recognition of file types HOT 1
- FileType magic sequence with offset cannot be recognised HOT 4
- byte[] or stream versions of apis HOT 2
- Error on validating HTML files HOT 4
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 filetypechecker.