meraproject/module/common/image/controller.php

52 lines
1.0 KiB
PHP
Raw Permalink Normal View History

<?
namespace controller\common\image;
use common\Image;
use ms\MS;
use ms\ms\structure\msControllerTable;
class Api extends msControllerTable {
static $class = 'common\Image';
static function uploadProfileTinyMCE(){
$res = [];
if(IF_PROFILE){
$res = Image::upload(['base64'=>false]);
}
echo je($res);
}
static function uploadAccountTinyMCE(){
$res = [];
if(IF_AUTH){
$res = Image::upload(['base64'=>false]);
}
echo je($res);
}
static function uploadProfileFromAppGallery(){
$res = [];
if(IF_PROFILE){
$res = Image::upload(['base64'=>false]);
}
echo je($res);
}
static function uploadProfile(){
$res = [];
if(IF_PROFILE){
$res = Image::upload();
}
echo je($res);
}
static function upload(){
$res = [];
if(IF_AUTH){
$res = Image::upload();
}
echo je($res);
}
}