File input

File input fields provide an easy way to upload files and store their path in your model. This input type utilizes Laravel Filemanager to handle the uploading process or to simply get path values.

Parameters
Parameter name Description
directory Upload directory under the public storage path
Important

Things to consider while using File inputs:

  1. Make sure your storage paths are set up correctly according to the Laravel specs
  2. Right now there is no possibility to remove a value previously set to a file input. It is expected to be fixed in a further release of GreenLight
  3. Make sure you publish and configure the file manager, for more information, check the docs of the package
Example

If you need a File input, the following configuration should be sufficient to handle uploads:

field_attachment_src:
    type: file
    name: Attached file
    parameters:
        directory: news_attachments