Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 216.73.216.44
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
3 /
league /
glide /
docs /
0.3 /
config /
Delete
Unzip
Name
Size
Permission
Date
Action
base-url.md
1005
B
-rw-r--r--
2020-11-05 09:00
basic-usage.md
1.47
KB
-rw-r--r--
2020-11-05 09:00
image-driver.md
406
B
-rw-r--r--
2020-11-05 09:00
max-image-size.md
621
B
-rw-r--r--
2020-11-05 09:00
secure-images.md
1.5
KB
-rw-r--r--
2020-11-05 09:00
source-and-cache.md
1.79
KB
-rw-r--r--
2020-11-05 09:00
the-server.md
2.03
KB
-rw-r--r--
2020-11-05 09:00
Save
Rename
--- layout: default title: Source & cache --- # Source & cache Glide makes it possible to access images stored in a variety of file systems. It does this using the [Flysystem](http://flysystem.thephpleague.com/) file system abstraction library. For example, you may choose to store your source images on [Amazon S3](http://aws.amazon.com/s3/), but keep your rendered images (the cache) on the local disk. ## Setup using Flysystem To set your source and cache locations, simply pass an instance of `League\Flysystem\Filesystem` for each. See the Flysystem [website](http://flysystem.thephpleague.com/) for a complete list of available adapters. ~~~ php <?php use League\Flysystem\Adapter\Local; use League\Flysystem\Filesystem; use League\Glide\ServerFactory; // Setup Glide server $server = ServerFactory::create([ 'source' => new Filesystem(new Local('path/to/source/folder')), 'cache' => new Filesystem(new Local('path/to/cache/folder')), ]); ~~~ ## Setup using local disk Alternatively, if you are only using the local disk, you can simply provide the paths as a string. ~~~ php <?php $server = League\Glide\ServerFactory::create([ 'source' => 'path/to/source/folder', 'cache' => 'path/to/cache/folder', ]); ~~~ ## Set default path prefix While it's normally possible to set the full source and cache path using Flysystem, there are situations where it may be desirable to set a default path prefix. For example, when only one instance of the `Filesystem` is available. ~~~ php <?php // Set using factory $server = League\Glide\ServerFactory::create([ 'source' => $filesystem, 'cache' => $filesystem, 'source_path_prefix' => 'source', 'cache_path_prefix' => 'cache', ]); // Set using setter methods $server->setSourcePathPrefix('source'); $server->setCachePathPrefix('cache'); ~~~