DEXTUpload.NET
Enumeration FileSignatureResult
- The minimum supported version
- 5.2.0.0
- The minimum support environment
- .NET Framework 4.0
- Explanation
-
The "FileSignatureResult" enumeration type represents the result of the file signature inspection.
In the case of the inspection at the stage of HTTP modules, there is no coding directly using the "FileSignatureResult". But in the case of the inspection directly using the "DEXTUpload.NET.FileSignatureAnalyzer" class, it is used for confirming the results.
using (var dext = new FileUpload()) { // Create an instance of the "FileSignatureAnalyzer" class. var fsa = new FileSignatureAnalyzer(); var element = dext.GetSingleFileElement(); if (!element.IsEmpty) { // You can perform the check at the temporary file level before saving. var fsr = fsa.Check(element.FileExtension, element.TempFilePath); switch (fsr) { case FileSignatureResult.Absence: // There is no signature information of the extension. ... break; case FileSignatureResult.Different: // The file does not match the signature information. ... break; case FileSignatureResult.Same: // The file matches the signature information. break; } } }
- Type
-
public enum FileSignatureResult
- Members
-
Absence
-
Target extension does not exist in the signature resources.
Same
-
Target extension is matched.
Different
-
Target extension exist in the signature data but there is no information to match.
-