The documentation here talks about working with files in a filesystem. What disk (or other method) should I use to get an S3 Asset Container's file? I've tried the following:

File::disk('assets')->put($filename, get_file_contents($contents));
File::disk('asset-container-name-here')->put($filename, get_file_contents($contents));

But they result in the following exception being thrown:

InvalidArgumentException in FilesystemManager.php line 109:
Driver [] not supported.

The documentation here states that "Each asset container gets its own filesystem. Now you can put them on S3, for example." However, it doesn't elaborate on how to access a specific asset container's filesystem using either of the following:

  • Statamic\API\File
  • Statamic\API\Storage
Answered by Jason Varga! Go to answer.