Skip to content

Releases: thomaswelton/laravel-rackspace-opencloud

Configurable RAXSDK_TIMEOUT

16 May 14:04
Compare
Choose a tag to compare

Add delete method

24 Sep 17:50
Compare
Choose a tag to compare
Merge pull request #9 from cadyfatcat/master

Added delete function for CDN objects and fixed typo on function name

Laravel 4.1 Support

20 Jan 17:31
Compare
Choose a tag to compare

Support for Laravel 4.1

Bug fix - Used rackspace 1.5.x

03 Nov 17:28
Compare
Choose a tag to compare

Fixed issues when using rackspace version 1.6

Locked down rack space open cloud to version 1.6.x

01 Nov 18:24
Compare
Choose a tag to compare

0.2.1

30 Oct 11:38
Compare
Choose a tag to compare
Bug fix - using this inside closure

Directory Sync, Automatic CDN urls

01 Oct 09:37
Compare
Choose a tag to compare

Upload files via the command line.

Synchronize a whole directory. Copies all files to /public/assets

php artisan cdn:sync public/assets

Copies all files to /assets trimming 'public' from the path

php artisan cdn:sync public/assets --trim=public

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.

URL::asset('assets/image.jpg');

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

File Upload and Container suport

24 Sep 13:45
Compare
Choose a tag to compare
OpenCloud::upload($container, $file, $name = null)
  • $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:

Route::post('/upload', function()
{
    if(Input::hasFile('image')){
        $file = OpenCloud::upload('my-container', Input::file('image'));
    }

    $cdnUrl = $file->PublicURL();
    // Do something with $cdnUrl

    return Redirect::to('/upload');
});