Azure Blob Storage is a fast, easy, and economical option to store files (i.e. blobs) which can also be used with Microsoft PowerApps.
When first using it, however, I quickly stumbled upon a major question: So... how do I upload files now??
PowerApps has one control called "Add Picture" which upon clicking enables you to choose from all the image files on a device. So far so good... but Blob Storage can't just handle pictures, but all kinds of files (documents, audio, etc.).
What one COULD do is to (at least on PC) just tell users to change the filter in explorer from "Image Files" to "All Files", but that's not really convenient, is it?
Instead, one could choose a more elegant solution and use the "Attachments" control. With this control, one cannot only add all kinds of files by default, but can also limit the number of files allowed in one "run" as well as file size.
There are of course more properties which can be used in various types of formulae, but I won't list all of them now.
After a successful upload to Azure Blob Storage (or any other target), the Attachments control can be reset, whereupon users can proceed with the next file(s).
So... why did I call this a "hidden" control in the title of this entry?
Because there is no regular way one can insert this control from the insert pane in the menu. In order to get the attachment control, one has to do the following things:
- Connect to a data source supporting attachments (like a CDS entity)
- Insert a form
- Connect the form to the entity and add the "field" called "Attachments" to the form.
- Copy the attachments control out of the form and use it wherever you want.
Have fun storing your data ;)
------------------------------
Christoph Gschliesser
Product Manager
BE-terna GmbH
Innsbruck
------------------------------