web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to use, attachment...
Power Apps
Unanswered

How to use, attachment control on gallery

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,
I am using attachment control (from form) to use on gallery and uploading the file, the file is getting uploaded successfully, but the contents are getting corrupted. 

The below is the code on "OnAdd Image" prop of the attachment control. I have attached the screenshot of the flow as well. Pls suggest. Also using expression: "base64ToBinary(triggerBody()['Createfile_FileContent'])" at 

"Set(varAttachment, JSON(Image1.Image, IncludeBinaryData));
Set(varBase64Only, Mid(varAttachment, Find(",",varAttachment)+1, Len(varAttachment)-Find(",",varAttachment)-1));Set(VarFileLink, AttachmentToSharePoint.Run(Last(DataCardValue2_4.Attachments).Name, varBase64Only, varWWDItemId, ThisItem.ID ).sharepointfilelink);
//If(Len(VarFileLink)>0, Notify("File Uploaded Successfully", NotificationType.Success));
Refresh(AttachmentDoc);
Reset(DataCardValue2_4);"
attachmentflow.PNG
attachmentflow.PNG
Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard