web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Preventing File Extens...
Power Apps
Unanswered

Preventing File Extension Forgery in Dataverse File Uploads

(1) ShareShare
ReportReport
Posted on by 5

Hello,
I'm currently developing an app that only allows PDF file uploads to Dataverse.
However, I'm concerned about potential file extension forgery attempts, where users might change the extension of a non-PDF file to ".pdf" and upload it.

I've reviewed Microsoft's documentation (https://learn.microsoft.com/en-us/power-apps/developer/data-platform/files-images-overview), which indicates that file restrictions can be implemented based on file extension and MIME type. However, I'm unclear about how Dataverse determines a file's MIME type. Therefore, I'd like to ask the following:

  • Can Dataverse identify non-PDF files from their content even if they have the ".pdf" extension?
  • If Dataverse cannot determine file format based on content, are there any alternative methods (within or outside Dataverse) to prevent file extension forgery?
I have the same question (0)
  • MichaelFP Profile Picture
    2,008 Moderator on at

    Hi!

     

    On the Private + Security Menu on the settings of the environment you can set the mime types allowed. So the Dataverse will gonna open the file and check the mime type to see if it is allowed to be inserted.

     

    This options affects all uploads attachments, file field, timeline and e-mail.

     

     

    Michaelfp_0-1720008729021.png

     

    If my answer helped you, please give me a thumbs up (👍). If solve your question please mark as solution ✔️. This is help the community.

     

  • ashley4234 Profile Picture
    5 on at

    Thank you for your response!
    I apologize for asking again, but is it correct to understand that MIME types are determined based on file's content in Dataverse?
    I came across an article that stated that MIME types are determined solely from the extension attached to the uploaded file in Dataverse, so I'm a bit concerned.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard