Labels allow you to give specific names to key files such as your logos and heros.
Labels are a mechanism to provide a static name which points towards a single file. After you create a label you can assign it a file in the management area of your app. After a file has been assigned you can reference the label in your application to access the file instead of using the Fileboy ID.
Because you can change the file attached to a label, you can update key files of your application without needing to update your code.
For example you could create a label named
homepage_banner_imageLabels can be referenced using the public key of your application, alongside the label name, eg:
1http://api.fileboy.id/files/get/a5f5d165-d783-4323-9df1-554cf1d7421d+asdasd
All of our pre-built clients provide easy mechanisms to reference files by label, for example:
1 2 3 4 5 6 7 8 9 10 11 12 13import { Image } from "@cd2/fileboy-react" function HomePage() { return ( <div> <Image label="homepage_banner_image" format="jpeg" /> </div> ) }