25 lines
375 B
PHP
25 lines
375 B
PHP
|
<?php
|
||
|
|
||
|
require_once ('vn/image/db.php');
|
||
|
|
||
|
use Vn\Image;
|
||
|
use Vn\Web\Auth;
|
||
|
|
||
|
class RestMod extends Vn\Rest\Module
|
||
|
{
|
||
|
function run ()
|
||
|
{
|
||
|
try {
|
||
|
Image\Db::init (FALSE, Auth::getUser (), Auth::getPassword ());
|
||
|
Image\Db::upload ();
|
||
|
Image\Db::deinit ();
|
||
|
}
|
||
|
catch (Exception $e)
|
||
|
{
|
||
|
throw new Rest\Exception ('Image', $e->getCode (), $e->getMessage ());
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
?>
|