Search code examples
laravelflysystem

How to Enable "reduced redundancy" on Laravel Storage


I'm using Laravel 5.2 Filesystem Storage Class.

And here's how I put the object to my bucket:

Storage::put('s3')->put([$path, $content]);

How do I add StorageClass => REDUCED_REDUNDANCY in the option? I tried to add on config/filesystem.php but it doesn't work

Thanks


Solution

  • I found the answer. We can actually put the third array on put() method if we include getDriver

    Storage::disk('s3')
    ->getDriver()
    ->put([$path, $resource, 'StorageClass' => 'REDUCED_REDUNDANCY']);