Download the PHP package garantpark/selectel without Composer
On this page you can find all versions of the php package garantpark/selectel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package selectel
Selectel Cloud Storage API
Selectel's Cloud Storage API Client.
Install
Via Composer
Basic Usage
Available Methods
Storage info
Containers list
Create new container
Container info
If container does not exists, \GarantPark\Selectel\Exceptions\ContainerNotFoundException
will be thrown.
Delete container
If container does not exists, \GarantPark\Selectel\Exceptions\ContainerNotFoundException
will be thrown.
Also, if container is not empty, \GarantPark\Selectel\Exceptions\ContainerNotEmptyException
will be thrown.
Get container files
If container does not exists, \GarantPark\Selectel\Exceptions\ContainerNotFoundException
will be thrown.
Upload file
If local file is not readable, \GarantPark\Selectel\Exceptions\LocalFileNotAvailableException
will be thrown.
If upload fails, GarantPark\Selectel\Exceptions\FileUploadFailedException
will be thrown.
Archive upload & unpack
Use same method as for file upload but add third argument $params
with extract-archive
key.
If upload fails, GarantPark\Selectel\Exceptions\FileUploadFailedException
will be thrown.
If archive extraction fails, GarantPark\Selectel\Exceptions\ArchiveExtractFailedException
will be thrown.
Supported archive types:
- tar
- tar.gz
- tar.bz2
Add metadata to a file
This will result in adding X-Object-Meta-Created-By
header to file with value Backup Manager
.
If container does not exists, GarantPark\Selectel\Exceptions\ContainerNotFoundException
will be thrown.
Copy file
If source or destination path does not exists, GarantPark\Selectel\Exceptions\ObjectNotFoundException
will be thrown.
Delete file
If file does not exists, GarantPark\Selectel\Exceptions\FileNotFoundException
will be thrown.
Create symlink to a file or direcory
Available symlink types:
symlink
: basic link,onetime-symlink
: onetime link (will be deleted after first visit),symlink+secure
: link with password protectiononetime-symlink+secure
: onetime link with password protection
If you're using password protected link, user must use _sslk
query param to get access to this file: http://XXXX.selcdn.ru/container-name/public/images/structure.png?sslk=mySecurePassword
Generate link for a private file download
First of all, you need to set up secret key to an account or a container (one time).
If container does not exists, GarantPark\Selectel\Exceptions\ObjectNotFoundException
will be thrown.
After doing so, you'll be able to generate signed links.
License
The MIT License (MIT). Please see License file for more information.