Storage::disk error
Created 6 years ago by adrianfalleiro

Trying to use the Storage facade to write a file to the filesystem as such:

Storage::disk('appstorage')->put('files.txt', $content);

Where 'appstorage' is defined as follows:

'appstorage' => [ 'driver' => 'local', 'root' => storage_path('app/appstorage') ]

I get the following error:

TypeError: Argument 2 passed to Anomaly\FilesModule\File\FileRepository::findByNameAndFolder() must implement interface Anomaly\FilesModule\Folder\Contract\FolderInterface, null given, called in /web/core/anomaly/files-module/src/File/FileSynchronizer.php on line 57

Any insights?

ryanthompson  —  6 years ago

Do you have a disk or anything with that same slug? It's trying to use the files adapter rather than the base one..

adrianfalleiro  —  6 years ago

Nah - I've only got a disk called local (local driver)

ryanthompson  —  6 years ago

Hmm.. spin an issue up for this one then I'll have to see why the adapter is creeping in there. I can do that tomorrow (today) 😛