class StoredFiles
The files derived from an uploaded image, each named in a setting.
Constants
| CONTENT_TYPES |
|
Properties
| protected Cloud | $assets |
|
Methods
void
replace(string $settingKey, string|null $contents, string $prefix, string $extension)
Store a file under a fresh name, replacing the one the setting names.
void
replaceSet(string $settingKey, array $files)
Store a set of files, replacing the set the setting names.
static array
options(string $path)
Options for storing an image under a name no other contents will have.
Details
at
line 32
__construct( SettingsRepositoryInterface $settings, Factory $filesystemFactory)
at
line 42
void
replace(string $settingKey, string|null $contents, string $prefix, string $extension)
Store a file under a fresh name, replacing the one the setting names.
at
line 61
void
replaceSet(string $settingKey, array $files)
Store a set of files, replacing the set the setting names.
at
line 83
static array
options(string $path)
Options for storing an image under a name no other contents will have.
The content type is given rather than left for a remote disk, such as S3, to guess from the bytes, which can take an SVG for text. As the name changes whenever the image does, it can be cached for good.