1. Go to this page and download the library: Download appitudeio/lcms-storage library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
appitudeio / lcms-storage example snippets
CMS\Storage;
// Initialize client
$storage = new Storage('your-domain.com', 'your_api_key');
// Upload a file
$response = $storage->upload('/path/to/local/image.jpg', '/uploads/image.jpg');
echo "Uploaded to: " . $response->url['asset'];
// List directory contents
$listing = $storage->list('/uploads');
foreach ($listing->items as $item) {
echo $item['key'] . " - " . $item['url'] . "\n";
}
// Delete file
$storage->delete('/uploads/old-image.jpg');
$storage = new LCMS\Storage\Storage(string $domain, string $apiKey);