codelego/phpfox-storage

Storage library for phpfox framework.

dev-master 2016-11-29 10:44 UTC

This package is not auto-updated.

Last update: 2024-09-28 20:03:43 UTC


README

=====================================

local path or real path.

echo  $storage->url('local', 'profile/picture/sample_01.png');
// print http://www.yoursite.com/path/to/profile/picture/sample_01.png

Or

print http://bucket-s3.amazone.com/path/to/profile/picture/sample_01.png

Move file from local

$data = $storage->move('s3', $filename,  'profile/picture/sample_01.png');

Copy from local

$data = $storage->copy('s3', $filename,  'profile/picture/sample_01.png');

Copy to local

$data = $storage->localCopy('s3', $filename,  'profile/picture/sample_01.png');

Delete object

$data = $storage->remove('s3', $filename,  'profile/picture/sample_01.png');