Hello everyone,
In my PowerApps form, users have the capability to upload PDF files. While I've already implemented a basic check to ensure the files are PDFs by disabling all controls until the user resolves any discrepancies, I'm worried this might not be sufficient. Here's a snippet of the code I'm currently using:
CountRows(
Filter(
DataCardValue41.Attachments,
Lower(Right(Name, 4)) <> ".pdf"
)
) > 0
This method works well for the most part, but since PowerApps forms will accept any allowed file types, a potential concern arises. A mischievous user could simply rename a .txt file to a .pdf, which could cause problems when I attempt to merge or combine all the uploaded PDF files using PowerAutomate. I haven't been able to test this scenario yet because we're still in the process of considering the purchase of a premium license.
With this in mind, my question is: Is there a way to validate that the uploaded file is a legitimate PDF using PowerAutomate beyond just checking the file extension? Any insights would be greatly appreciated!
PS: Sorry if I put a wrong "Labels" and/or "Message Tags", this is my first post. Thanks.

Report
All responses (
Answers (