We need to validate the file headers to ensure that the file is what
it says it is.
This is using the the FileSignatures repo on Github for the signature validation
Each file type will have a a certain set of bytes that defines the file
type. We search the file for that signature to determine whether the uploaded file is a valid file.
A Google search on "File signatures" would give the file signatures for the most common file types.
We define the [AllowedFileTypeAttribute] that replaces [AllowedFileExtensionAttribute]
Because
This is using the the FileSignatures repo on Github for the signature validation
Each file type will have a a certain set of bytes that defines the file type. We search the file for that signature to determine whether the uploaded file is a valid file.
A Google search on "File signatures" would give the file signatures for the most common file types.
We define the
[AllowedFileTypeAttribute]
that replaces[AllowedFileExtensionAttribute]
Ref:
AB #195851