OP\RemoteAssetDownloadFilesController
Takes in a post array of files to download from a remote server
Synopsis
class RemoteAssetDownloadFilesController
extends Controller
{
- // members
- private static string $assets = 'assets';
- // methods
- public void index()
- public void HandleFileRequestArray()
- public Member getCurrentUser()
- public void handleFile()
- public string temporaryFile()
- public void DownloadFiles()
- protected Upload getUpload()
Hierarchy
Extends
- SilverStripe\Control\Controller
Uses
- SilverStripe\Core\Config\Configurable
Members
private
- $assets
Methods
protected
- getUpload() — builds an upload function in real time
public
- DownloadFiles() — will concurrently download the files
- HandleFileRequestArray() — Build a response array, and handle the remote curl request for the bulk download of files
- getCurrentUser() — Find the requested user to handle the file request. If being run by cli, you will use the client credentials found in the yml file.
- handleFile() — Binds SilverStripe logic to handle saving the file into the asset manager
- index() — Downloads a single file
- temporaryFile() — builds a temporay file, and sets it to be deleted after the script has ended.