The Concrete\Core\File\File object can be seen frequently in Concrete CMS. This object represents a file uploaded to the file manager. Examples of blocks that use the File object include:
- Image Slider
Any time a block needs to make use of a file that a user can upload, they should hook into the file manager. The File Manager handles uploading, importing and storing of files, translating uploading files into File objects transparently behind the scenes. Developers don't have to worry about it – they just worry about what to do with the files once they have them. The File Manager also manages permissions and metadata about files, and even maintains multiple versions of Files so that changes can be rolled back, and workflow on files can be preserved. It effectively turns Concrete into a Digital Asset Management System. Read on to learn how to enable your blocks to use the File Manager, how to manually import files into theFile Manager, how to programmatically list, retrieve and update File objects and more.