Filepicker is the frontend type business-process designed for managing file downloads.
The process of managing files via frontend should be built the following way:
- Getting data in the frontend view;
- Uploading files onto the server to get unique IDs for each file;
- Making data model objects according to the files which were uploaded;
- Posting data model objects into the database.
Filepicker usage
Filepicker Get Properties is used to get files from frontend application. You get the files array of objects for further usage.
If a single element was uploaded, get just the element with index = 0. For that, the Array Element block is used.
The resulting array element must be uploaded to the server for further work with it. Server request POST /_files/ type of blocks are used for this purpose. After sending the file to the server, it obtains its unique ID. This ID is used to write the object to the database.
File object is used to make new data model object using Expand-Make blocks.
Server request POST type of block is used for posting the newly created data model object into the database.