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?
Solved! Go to Solution.
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.
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
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.
@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?
Try this in the custom JS section of basic form. Try it as a onload event.
@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.
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.
@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.