get medida

This commit is contained in:
CHIEFSOFT\ameye
2023-08-10 17:32:49 -04:00
parent fee62721fe
commit fe6af677c4
3 changed files with 14 additions and 8 deletions
+2 -3
View File
@@ -252,9 +252,8 @@ define('WRENCHBOARD_ACCOUNT_COUNTRY_BANKS', 11183);
define('WRENCHBOARD_ACCOUNT_HOMEBANNERS', 11200); define('WRENCHBOARD_ACCOUNT_HOMEBANNERS', 11200);
define('WRENCHBOARD_ACCOUNT_NOTIFICATIONS', 11205); define('WRENCHBOARD_ACCOUNT_NOTIFICATIONS', 11205);
define('WRENCHBOARD_PICTURE_PROFILE', 11300); const WRENCHBOARD_PICTURE_PROFILE = 11300;
define('WRENCHBOARD_PICTURE_FAMMEMBER',11305); const WRENCHBOARD_PICTURE_FAMMEMBER = 11305;
const WRENCHBOARD_RESOURCE_MYFILES = 11307; const WRENCHBOARD_RESOURCE_MYFILES = 11307;
const WRENCHBOARD_MYFILES_LIST = 11309; const WRENCHBOARD_MYFILES_LIST = 11309;
+1 -1
View File
@@ -194,7 +194,7 @@ $routes->post('/en/wrench/api/v1/mynotifications', 'WrenchNotifications::
$routes->post('/en/wrench/api/v1/dashrecent', 'WrenchDashRecent::apigate'); $routes->post('/en/wrench/api/v1/dashrecent', 'WrenchDashRecent::apigate');
$routes->post('/en/wrench/api/v1/getmedia', 'WrenchMedia::apigate'); $routes->post('/en/wrench/api/v1/getmedia', 'WrenchMedia::apigate');
$routes->get('/en/wrench/api/v1/getmedia', 'WrenchMedia::apigate'); $routes->get('/en/wrench/api/v1/getmedia/(:any)', 'WrenchMedia::apigate/$1');
+11 -4
View File
@@ -11,7 +11,7 @@ class UploadManager extends Model
$action = $in["action"]; $action = $in["action"];
//DECIDE IF PARENT FOLDER IS PRESENT //DECIDE IF PARENT FOLDERS ARE PRESENT
if (!file_exists($this->savePath.'CONTRACTS')) { if (!file_exists($this->savePath.'CONTRACTS')) {
mkdir($this->savePath.'CONTRACTS', 0777, true); mkdir($this->savePath.'CONTRACTS', 0777, true);
} }
@@ -31,9 +31,16 @@ class UploadManager extends Model
$out= $in; $out= $in;
switch ($action){ switch ($action){
case WRENCHBOARD_PICTURE_PROFILE:
case WRENCHBOARD_PICTURE_FAMMEMBER:
case WRENCHBOARD_RESOURCE_MYFILES: case WRENCHBOARD_RESOURCE_MYFILES:
// MAKE SURE FOLDER AS PER PROECESS IS AVILABLE
if ( trim($in["uid"]) == ''){
$out["error_msg"] = "invalid_upload_call";
$out["call_backend"] = false; // something went bad
return -1;
}
// MAKE SURE FOLDER AS PER PROCESS IS AVAILABLE
$thisProfileFolder = $this->savePath.'PROFILE/'.$in["uid"]; $thisProfileFolder = $this->savePath.'PROFILE/'.$in["uid"];
if (!file_exists($thisProfileFolder)) { if (!file_exists($thisProfileFolder)) {
mkdir($thisProfileFolder, 0777, true); mkdir($thisProfileFolder, 0777, true);
@@ -57,7 +64,7 @@ class UploadManager extends Model
break; break;
case WRENCHBOARD_CONTRACT_MESSAGE: case WRENCHBOARD_CONTRACT_MESSAGE:
// MAKE SURE FOLDER AS PER PROECESS IS AVILABLE // MAKE SURE FOLDER AS PER PROCESS IS AVAILABLE
$thisContactFolder = $this->savePath.'CONTRACTS/'.$in["contract"]; $thisContactFolder = $this->savePath.'CONTRACTS/'.$in["contract"];
if (!file_exists($thisContactFolder)) { if (!file_exists($thisContactFolder)) {
mkdir($thisContactFolder, 0777, true); mkdir($thisContactFolder, 0777, true);