Download the PHP package thomaswelton/laravel-rackspace-opencloud without Composer
On this page you can find all versions of the php package thomaswelton/laravel-rackspace-opencloud. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-rackspace-opencloud
Installation
Update your composer.json
file to include this package as a dependency
Register the OpenCloud service provider by adding it to the providers array in your app/config/app.php
file.
Alias the OpenCloud facade by adding it to the aliases array in the app/config/app.php
file.
Configuration
Copy the config file into your project by running
Edit the config file to include your username, api key and region.
Usage
Artisan Commands
Upload files via the command line.
Synchronize a whole directory. Copies all files to /public/assets
Copies all files to /assets trimming 'public' from the path
The sync command will save a file adjacent to the synchronized directory. It contains the http and https urls for your container. Along with a md5 hash of the directory. In this way when a file changes inside a directory and is reuploaded you get a new cache busted URL.
If you are using the URL helper then it will return a CDN url for a file, if it finds a *.cdn.json file adjacent to one of it's parent directories.
You should be able to run php artisan cdn:sync public/assets --trim=public
before or during a deployment and once complete all files being called by URL::asset()
will return a CDN resource
Upload to CDN
Using this method will make the container public, even if previously set as private. This is a known issue yet to be addressed.
- $container - (string) Name of the container to upload into
- $file - (string / UploadedFile) Path to file, or instance of 'Symfony\Component\HttpFoundation\File\UploadedFile' as returned by Input::file()
- $name - (string) Optional file name to be used when saving the file to the CDN.
Example:
Delete from CDN
All versions of laravel-rackspace-opencloud with dependencies
illuminate/support Version 4.x
rackspace/php-opencloud Version 1.5.*
alchemy/zippy Version 0.1.0