1. Go to this page and download the library: Download hypejunction/hypeprototyper 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/ */
$entity = array(
'type' => 'object',
'subtype' => 'file',
'access_id' => ACCESS_LOGGED_IN,
);
// In case we want to do more stuff with the new entity
try {
$controller = hypePrototyper()->action->with($entity, 'file/upload');
if ($controller->validate()) {
$entity = $controller->update();
}
if ($entity) {
// do more stuff
}
} catch (Exception $ex) {
// do something with the error
}