PHP code example of andrelohmann-silverstripe / extended-file
1. Go to this page and download the library: Download andrelohmann-silverstripe/extended-file 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/ */
andrelohmann-silverstripe / extended-file example snippets
// Load from File
$File = new File();
$File->load(FILE_PATH, TARGET_PATH);
// use CDN URL
Config::inst()->update('ExtendedFile', 'cloud_url', YOUR_CDN_DOMAIN);
echo $File->getCloudURL();