Select to view content in your preferred language

EXIF data in SharePoint Online

1623
2
09-27-2023 12:23 PM
RaajRaaj
Esri Contributor
3 2 1,623

 

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
SCVTAGIS
New Contributor II

Hi, Thanks for posting the solutions. We actually tried this but we found that the Encodian Flowr converted the coordinates of Iphone photos from DD/MM/SS to decimal degree neglecting the East and West. For example, in a photo properties info (see attached file)Capture1.JPG, you can see the lat and long were recorded using the semicolon to distinguish the East and West. When Encodian converted these values, they look like this in SharePoint Capture2.JPG

So the long is supposed to have a negative value as the location when the photo was taken in in CA, USA. I was wondering if there is an easier way in SharePoint to make the conversion right. Thanks! 

RaajRaaj
Esri Contributor

@SCVTAGIS 

 

Hello,

 

Thanks for reaching out to us on EC. If you view the schema in the "Parse JSON" action, you will notice the LongRef and LatRef fields as shown in the image below,

 

Snag_2385bb1.png

 You can map those attributes to columns in your SharePoint list in the "Update file properties" action as shown below,

 

RaajRaaj_0-1712887592294.png

and once the flow completes, you will see the LongRef and LatRef values in your SharePoint list.

 

RaajRaaj_1-1712887724428.png

I used the "Concat" function in SharePoint to concatenate the Long value with LongRef and Lat value with LatRef respectively.

 

Please let me know if this helps and please do not hesitate to reach out to us if you have any further questions on this topic or anything related to ArcGIS for SharePoint 🙂.

 

Thanks,

 

Raaj