For Security requirements, I have a requirement to implement checks on the file attached.
I’ve already extended activity CallVirusCheck to verify the file extension, but how can I test if the extension corresponds to the real file format?
ex: pdf extension is a real pdf file and not a text file with modified extension
Create a function with below code, call this function after uploading the file using AttachFile Control(may be in post activity of Flow action where upload control is present).
If function returns true, file is valid PDF format, else not.