Select to view content in your preferred language

EXIF data in SharePoint Online

1638
2
09-27-2023 12:23 PM
RaajRaaj
Esri Contributor
3 2 1,638

 

Why am I not able to see EXIF file properties in

SharePoint online?

 

Until 2019 users were able to upload image files containing EXIF (Exchangeable Image File format) data and automatically import the EXIF properties into SharePoint document libraries. Importing the EXIF properties would expose the GPS data as columns in the document library view.

The Automatic EXIF property import feature in SharePoint relied on an underlying platform capability that is no longer available. When this capability was removed from the platform, the dependent feature was also removed in SharePoint Online.

 

We upload thousands of image files with EXIF data in SharePoint online, how do we get this capability back?

While the automatic import feature for EXIF data is no longer supported in SharePoint online, you can still use a Power Automate flow to extract the EXIF data including GPS data from image files.

In this blog, I will explain the steps to set up the Power Automate flow to extract the GPS data within the EXIF properties from image files and using the ArcGIS for SharePoint web part in SharePoint online to plot the GPS data on a map.

Let’s say I have a project that requires image files containing EXIF data to be stored in document libraries in SharePoint online. The project also requires the GPS data to be exposed as columns in the document library and use the GPS data to plot the points on a map. The files contain GPS data in the EXIF properties, and I want to first extract the GPS data and populate directly in the document library columns. Once the document library view is populated with the “Longitude” and “Latitude” data from the image files, I can then add the document library as a map layer using the ArcGIS for SharePoint app in SharePoint online.

Power Automate flow:

To extract the EXIF properties (with GPS data) from image files, I will use “Encodian Flowr connector in Power Automate. “Encodian Flowr” is a 3rd party Power Automate connector which contains actions that can be used to extract the EXIF properties from image files.

RaajRaaj_11-1695841559764.png

 

When creating the flow, I will set it up as an “Automated cloud flow” since we would like the flow to trigger automatically when new files are uploaded to the document library in SharePoint.

The first action (When a file is created (properties only)) is the flow’s trigger.

RaajRaaj_1-1695840708728.png

RaajRaaj_2-1695840779187.png

In the “Encodian Flowr” action – Get image information, choose “File content” from the previous action (Get file content) and choose “Yes” for Simplified Lat/Long Format. This action will get all the image information of the files uploaded in the document library (doc library name: “EXIF”).

RaajRaaj_3-1695840811152.png

RaajRaaj_0-1695842033429.png

 

The “Encodian Flowr” action – “Remove EXIF tags from image”, extracts the EXIF properties from the uploaded image files which can be used to update the file properties in the subsequent SharePoint action “Update file properties”. Populate “File content” with the  “File content” from the previous action (Get file content). The files I will be uploading are of type “JPG” which needs to be specified in the “Image type”.

 

The EXIF properties in the JPG files are stored in JSON format. Therefore, I will need to use the built-in action “Parse JSON” to parse the JSON output, which can then be used to update the file properties in the SharePoint document library.

 

“Save” the flow and run a “Test” to see if the “Get Image file” generates the EXIF data JSON.

RaajRaaj_5-1695840873173.png

 

In the “Parse JSON” action, use the “EXIF Data (JSON)” from the “Get Image information” action

RaajRaaj_6-1695840913973.png

 

Click on “Generate from Sample” and paste the JSON output from “Get image information” action as shown in the screen capture video. Click on “Done”

RaajRaaj_7-1695840942408.png

 

RaajRaaj_8-1695840957255.png

 

Before adding the next action in the Power Automate flow, I will add columns for storing the “Longitude” and “Latitude” values in the document library where I will be uploading the JPG files.

 

RaajRaaj_10-1695840997596.png

 

The next step is to add the “Update file properties” SharePoint action which would update the document library with the GPS data extracted from the EXIF properties of the uploaded files.

The below video illustrates the last action in the flow – Update file properties, which populates the “Longitude” and “Latitude” columns in the document library when JPG files containing EXIF GPS data are uploaded into a document library in SharePoint.

Once the “Longitude” and “Latitude” values are updated in the document library, it’s now ready to be added as map layer in the ArcGIS for SharePoint web part.

The ArcGIS for SharePoint app can be downloaded from MS App Source,

https://appsource.microsoft.com/en-us/product/office/wa200003118?tab=overview

Once the app is installed in the SharePoint tenant’s app catalog, the app or web part be added to a SharePoint page which can then be published for sharing information internally or externally.

The below video illustrates the steps to add the ArcGIS web part to a SharePoint page, adding the “EXIF” document library as a map layer and enabling the auto-refresh using the layer properties, which would refresh the map using the interval set for auto-refresh. The auto-refresh is only needed if the user is actively monitoring the points plotted on the map while the files are being uploaded. Alternatively, refreshing the browser will also plot the coordinates corresponding to the newly uploaded files.

 

 

 

 

2 Comments