Skip to content

rgglez/yii-ftpassetmanager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

yii-ftpassetmanager

License GitHub all releases GitHub issues GitHub commit activity

EFtpAssetManager extends CAssetManager for Yii 1.1, to allow the use of PHP's wrappers ftp:// or http:// to store the assets. This is useful in a webfarm scenario where the webserver is the frontend to a number of PHP FastCGI servers which in other way would need to store the assets in a central storage shared by NFS or some other shared filesystem, or in every server.

Installation

  • Unpack or clone the extension to your extensions directory.
  • Setup your FTP and HTTP servers in the machine which will serve the assets.

Usage

In the 'components' section of your main.php:

<?php
//...
'components' => [
    // ...

    'assetManager' => [
        'class' => 'EFtpAssetManager',
        'lockAssets' => true,
        'lockPath' => '/var/assets',
        'basePath' => 'ftp://login:password@assets.example.com/',
        'baseUrl' => 'https://assets.example.com/',    
    ],
    
    // ...
],

License

Copyright © 2008 Rodolfo González González.

See the LICENSE file.

About

Assets manager for Yii 1.1. Uploads assets to a FTP server. It locks paths so no duplicated uploads are executed.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages