Showing results for 
Search instead for 
Did you mean: 

Image/file columns in portals Web API

Please add portal support for the new Image and File columns. Internal (CRM) users and solution architects prefer these fields over Notes because they are clearly labelled (so purpose is clearly defined), easy to identify (addressable by column name, not lost inside a pile of arbitrary notes, can be enforced with business rules), and they can be previewed or downloaded directly from form. There are also positive security implications here, because images/files can reside directly on the record they are applicable to, instead of being on an associated record (where ownership might not cascade). Because of the clear benefits of these column types, there is a growing desire to use them, and there is a need for the same data to be portal-accessible.


Similar to what has already been done in Power Apps (for retrieving image data and for retrieving file data), please add endpoint(s) to portals for downloading full images/files stored in Dataverse image/file columns, accompanied by MIME content-type if available, and also honor Web Roles and Entity Permissions.


The hope is to allow for things like this:


<!-- embed a category icon in a web page -->
<img src="_api/categories({{}})/new_icon/$value?size=full" />

<!-- embed product thumbnail in a product gallery web page -->
<img src="_api/products({{}})/entityimage/$value" />

<!-- embed full size product image in a web page -->
<img src="_api/products({{}})/entityimage/$value?size=full" />

<!-- embed customer profile image in web page -->
<img src="_api/contacts({{}})/entityimage/$value?size=full" />

<!-- allow customer to download file -->
<a href="_api/contacts({{}})/new_importantfile/$value" download />Download</a>


Currently, Web Templates and FetchXML only return the first 36 bytes of file columns, and only return the thumbnails (scaled down and cropped versions) of image columns. 

Status: New