Goravel Part 14: Adding File Uploads and Downloads to Tasks with Storage
This installment of the Goravel tutorial series adds attachment support to TaskFlow, so users can attach files such as screenshots or PDFs to tasks. Each uploaded file is saved to a storage disk, while Postgres records which task the file belongs to and who uploaded it. The default disk is configured in config/filesystems.go, and the author keeps the local driver so files stay on the server and are only sent by a handler once authorization policy allows it. The setup also makes the default disk configurable from the environment, allowing tests to use a separate testing disk. The full code and diffs are available in the author's linked repository branch.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in