Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

Improving the storage event listeners

Compare
Choose a tag to compare
@burzum burzum released this 20 Jan 23:59
· 198 commits to 4.0 since this release

Exceptions to the rescue!

There is now an exception throw if a listener can't work with a specific adapter. Also I've introduced a new BaseListener that doesn't have any restrictions on which adapter it will take. In theory you can use it with any storage backend as long as the path it builds for the files is compatible with your chosen storage backend.

The reason for this change is that you'll end up with the "Why the fuck is it not storing my file?" because there is no hard break when the described scenario happens. The exception with it's informative message should make this now pretty clear.

For details please review this commit 9bece86

A new shell command...

...has been introduced to store a file via command line.

bin/cake storage store <some-file-to-store-here>
File successfully saved!
UUID: ebb21e79-029d-441d-8f2e-d8c20ca8f5a9
Path: file_storage/18/ef/b4/ebb21e79029d441d8f2ed8c20ca8f5a9/<some-file-to-store-here>

Documentation update

The Quick Start tutorial has been updated as well.