cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
opticshrew
Helper II
Helper II

Block File Types in Notes

Hello!

 

This is for Power Apps Portals but the previous forum has been locked.

 

I want to upload an attachment to notes however want to only allow certain file types. I have read using "Accept MIME Type(s)" and "Restrict MIME Types" could resolve this so have added in the following configuration:

 

application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/pdf, application/png, application/jpg, application/mp4, application/mpeg, application/avi

 

This however doesn't block .exe files, am I missing something?

1 ACCEPTED SOLUTION

Accepted Solutions

@opticshrew 

 

I can suggest you use the new File Columns in Portals instead of Notes / SharePoint attachment. 

 

https://docs.microsoft.com/en-us/power-apps/maker/portals/configure/file-column 

 

Hope it helps. 
------------

If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

 

View solution in original post

6 REPLIES 6
ragavanrajan
Super User
Super User

Hi @opticshrew 

I remember there was a bug for MIME types.  You can use JS to achieve this. Maybe the following post will help from @hardikv 

 

https://powerusers.microsoft.com/t5/Power-Apps-Portals/Portal-SharePoint-file-type-upload-restrictio... 

 

Hope it helps. 
------------

If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

 

opticshrew
Helper II
Helper II

@ragavanrajan thanks for the quick reply. I get how this would work for subgrids and other forms but unsure how I could achieve this with notes. Would I add this into the Basic Form Metadata OR onto the Basic Form itself? 

ragavanrajan
Super User
Super User

Try this in the custom JS section of basic form. Try it as a onload event. 

 

 

opticshrew
Helper II
Helper II

@ragavanrajan I think I know why it's not working. We've integrated with SharePoint so even if I block the file types in System Settings it doesn't do the check. So my thoughts are these will need to be blocked on a SP side.

@opticshrew 

 

I can suggest you use the new File Columns in Portals instead of Notes / SharePoint attachment. 

 

https://docs.microsoft.com/en-us/power-apps/maker/portals/configure/file-column 

 

Hope it helps. 
------------

If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

 

opticshrew
Helper II
Helper II

@ragavanrajan I think that's a suitable suggestion however I don't want to be adding preview features into production AND we have a requirement to upload multiple files (with no upper limit), and believe the cost of using SharePoint is cheaper (overall) than Dataverse.

Helpful resources

Announcements
Carousel Community Blog

Check out the Community Blog

Read all about the most recent blogs in the community!

Carousel News & Announcements

What's New in the Community?

Check out the latest News & Events in the community!

Users online (3,452)