Download the PHP package railroad/remotestorage without Composer
On this page you can find all versions of the php package railroad/remotestorage. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package remotestorage
remotestorage
Wrapper for slightly easier use of league/flysystem
with AWS S3 by our Laravel application.
- remotestorage
- Installation, Configuration, Use
- Installation
- Configuration
- Use
- RemoteStorageService
- put
- Usage Example
- Parameters
- Responses
- read
- Usage Example
- Parameters
- Responses
- exists
- Usage Example
- Parameters
- Responses
- delete
- Usage Example
- Parameters
- Responses
- create_dir
- rename
- copy
- get_mimetype
- get_timestamp
- get_size
- delete_dir
Installation, Configuration, Use
Installation
Run $ composer vendor:publish
to copy the package's configuration file "/config/remotestorage.php" to your application's "/config" directory.
(assuming you're using Composer, Laravel, and AWS S3)
Configuration
Define the following environmental variables with appropriate values:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_DEFAULT_REGION
- AWS_BUCKET
Add the service provider (\Railroad\RemoteStorage\Providers\RemoteStorageServiceProvider
) to the 'providers
array in you application's /config/app.php:
Run $ php artisan vendor:publish
to copy the config file and create a remotestorage.php file in your application's /config directory. This will take the values you supplied in the .env file and pass them needed.
Use
Inject the Railroad\RemoteStorage\Services\RemoteStorageService
class where needed
Include namespace at top of file:
... to save yourself having to specify the namespace everywhere:
RemoteStorageService
All methods below are public.
put
Usage Example(s)
Parameters
# | name | required | type | description |
---|---|---|---|---|
1 | filenameRelative | yes | string | name to save file as on remote |
2 | filenameAbsolute | yes | string | path to file to upload |
Responses
outcome | return data type | return data value |
---|---|---|
succeeded | boolean | true |
failed | boolean | false |
read
Usage Example(s)
Parameters
# | name | required | type | description |
---|---|---|---|---|
1 | filenameRelative | yes | string | path to file name from bucket root |
Responses
outcome | return data type | return data value (example) | notes about return data |
---|---|---|---|
failed | boolean | false | |
succeeded | string | "b"""Ø à\x00\x10JFIF\x00\x01\x01\x01\x00 \x00\x00\x00 ■\x00;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 70\n █\x00C\x00\n\x07\x07\x08\x07\x06\n\x08\x08\x08\v\n\n" |
Raw image data as string |
exists
Usage Example(s)
Parameters
# | name | required | type | description |
---|---|---|---|---|
1 | filenameRelative | yes | string | path to file name from bucket root |
Responses
outcome | return data type | return data value |
---|---|---|
exists | boolean | true |
does not exist | boolean | false |
delete
Usage Example(s)
Parameters
# | name | required | type | description |
---|---|---|---|---|
1 | filenameRelative | yes | string | path to file name from bucket root |
Responses
outcome | return data type | return data value |
---|---|---|
exists | boolean | true |
does not exist | boolean | false |
create_dir
[TODO]
rename
[TODO]
copy
[TODO]
get_mimetype
[TODO]
get_timestamp
[TODO]
get_size
[TODO]
delete_dir
[TODO]
All versions of remotestorage with dependencies
laravel/framework Version ^11.9
guzzlehttp/guzzle Version ^7.2
aws/aws-sdk-php Version ^3.0.0
league/flysystem Version ^3.0
league/flysystem-aws-s3-v3 Version ^3.0