The issue you're facing could be related to changes or updates in the Power Apps environment, but let's first troubleshoot based on your current setup. Here are a few things you can check and update in your app:
Ensure that the Camera1.Stream
is still correctly capturing the image. A good test is to display the image on a label or gallery control to ensure the camera is capturing the stream properly.
In your formula for saving attachments to SharePoint, the image stream needs to be converted to a format SharePoint can recognize, like base64 encoding. However, SharePoint lists expect an actual file or image as an attachment, not just a stream.
Try modifying the Collect
function to include base64 encoding:
Collect(
colImage2,
{
Value: JSON(Camera1.Photo, JSONFormat.IncludeBinaryData),
DisplayName: Text("Mikel-" & Now(), "[$-en]hhmmss") & ".jpg",
Id: varPID,
AbsoluteUri: ""
}
)
Check that the Attachments
control is still correctly bound to the form. Sometimes, it loses its connection to the data source, and you need to re-establish it.
frmFoto
is bound to the correct SharePoint list (in this case, Brazil_Attachment_Picture
).Attachments
control is set to colImage2
and is allowed to upload images.Instead of directly using Patch(Brazil_Attachment_Picture, frmFoto.Updates);
, try using SubmitForm(frmFoto)
to submit the form with the attachment. The Patch
function may not handle file attachments in the same way as the SubmitForm
function does.
Here’s an alternative approach for the Save
button:
SubmitForm(frmFoto);
Clear(colImage2);
Refresh(Brazil_Attachment_Picture);
ResetForm(frmFoto);
If everything worked previously and stopped after a couple of weeks, it's possible that an update might have affected the behavior of file attachments. You could try reverting to an earlier version of your Power App to see if that resolves the issue, or check Microsoft Power Apps updates for any reported issues.
Sometimes, there could be issues if the file size exceeds certain limits imposed by SharePoint or Power Apps. Ensure that the images captured by the camera control are within a reasonable size.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 1