So, I have a table Signal and 1:N table Signal Attachment. Signal Attachment table has a lookup to Signal and field of type File.
In Canvas app on New/Edit screen I have a Attachments control (outside of the Form) to upload attachments, and a Gallery to view file names and remove attachments:
I have code AttachmentControl.OnAddFile (to add files to colSignalAttachments collection, marked as IsNew), Gallery.RemoveIcon.OnSelect (to mark item in colSignalAttachments as IsDeleted) and Gallery.RestoreIcon.OnSelect (to remove IsDeleted mark).
In Canvas app I'm able to upload attachments and save them. If I open my Signal Attachment table in MDA I can see attachments and view it without any issue.
However, I cannot download attachments on my View screen.
AttachmentControl.Items:
ForAll(
Filter(
'Signal Attachment',
Signal.Signal=ctxViewSignal.Signal
).Attachment,
{
DisplayName: ThisRecord.Attachment.FileName,
Value: ThisRecord.Attachment.Value
}
)
It shows my files names correctly, but on download I receive "BlobNotFound":
The only noticible difference between my app and the video guide is that I cannot map DisplayName and Value field on the Attachment Control Properties pane (there are no such properties).
Instead of using Attachments control, I created a Gallery with modern buttons with icons to download files via Dataverse API. And it looks much nicer with file type icons:
How to download file from Dataverse File column using Dataverse API:
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.