File picking
As seen from the point of view of a user, file picking is the act of selecting a file in DAM (typically in order to attach an image to e.g. a product in a webshop). In this section we shall not go into how the file picker UI works. Instead we focus on the technical solution. The term "caller" used in the following denotes the external software that initiates the file picker interaction.
In terms of file picking, what the user actually picks is the information needed to fetch a cached representation at a later time. The file picker supports the picking of original files as well as cropped versions of transformable files. The result that is returned to the caller is as follows
- File id
- File name
- Cropping id (if user picked a specific cropping)
- Cropping name (if user picked a specific cropping)
Caller should save file id and cropping id and use it later on when the picked file should be fetched. It's not necessary to save file name and cropping name in order to fetch the file later. These values can be saved by caller in order to have some extra information about the file if so desired.