diamond.security.validation.file

Copyright © DiamondMVC 2019

Members

Aliases

FileValidator
alias FileValidator = bool delegate(ubyte[])

Alias to a file validator delegate.

Functions

addCustomFileValidator
void addCustomFileValidator(string extension, FileValidator handler)

Adds a custom file validator.

isValidFile
bool isValidFile(string extension, ubyte[] data)

Checks whether specified file data matches an extension. Currently this supports ".jpg, .jpeg, .gif, .png, .pdf"

Meta

Authors

Jacob Jensen (bausshf)