
Announcements
Hello,
I couldn't find a solution for this on the forums. So I have been successful in creating a file of an attachment added in a sharepoint list. But I'm unable to get the attachment created with its right extension. So the file doesn't open unless I add the extension name. So as a workaround, I requested the team to add .JPG formats. and What I'm doing is adding [ .jpg ] in flow.
The issue is some attachments are in PNG, or other formats.
Any other ways to achieve this use case?
Thank you.
Hi radhi-bh,
I don't think there is a property from SharePoint that will give you only the file extension. However the "Get attachments" action returns the full name of the file, including extension, in the DisplayName property. So you could use the indexOf() or lastIndexOf() functions to find the position of the dot character, and then use substring() to get the extension
Let me know if this helps,
Tom