save media
This commit is contained in:
@@ -51,7 +51,7 @@ class WrenchMedia extends BaseController
|
||||
$fileSection = $uriSegments[$segLen-2];
|
||||
$fileUID = $uriSegments[$segLen-1];
|
||||
|
||||
$supportedSections = ['nn'=>100,'myfile'=>200,'contracts'=>300,'family'=>400];
|
||||
$supportedSections = ['profile'=>100,'myfile'=>200,'contracts'=>300,'family'=>400];
|
||||
if (!in_array($fileSection, $supportedSections)) {
|
||||
// section not supported
|
||||
// return;
|
||||
@@ -59,6 +59,10 @@ class WrenchMedia extends BaseController
|
||||
|
||||
/*
|
||||
* VERIFY ALL PARAMETERS ARE GOOD
|
||||
#define WRENCH_FILE_PROFILE 100
|
||||
#define WRENCH_FILE_MYFILE 200
|
||||
#define WRENCH_FILE_CONTRACTS 300
|
||||
#define WRENCH_FILE_FAMILY 400
|
||||
*/
|
||||
|
||||
if( $this->sessionCheckString($sessionId)== PHP_API_OK ){
|
||||
@@ -89,9 +93,23 @@ class WrenchMedia extends BaseController
|
||||
}
|
||||
//print_r($out);
|
||||
///opt/wrenchboard/TEST/PROFILE/dfc9d601-780f-4d78-839f-422f0928f911/PORTRAIT/
|
||||
switch($supportedSections[$fileSection]){
|
||||
case 'profile':
|
||||
///opt/wrenchboard/TEST/PROFILE/3119b744-42ad-4834-bb83-b737588754ca/PORTRAIT
|
||||
$selectedFile = $this->savePath.'PROFILE/'.$out["member_uid"]."/PORTRAIT/". $out["saved_file_name"];
|
||||
break;
|
||||
|
||||
case 'family':
|
||||
///opt/wrenchboard/TEST/PROFILE/3119b744-42ad-4834-bb83-b737588754ca/FAMILY/3119b744-42ad-4834-bb83-b737588754ca/
|
||||
$selectedFile = $this->savePath.'PROFILE/'.$out["member_uid"]."/FAMILY/family_uid/". $out["saved_file_name"];
|
||||
break;
|
||||
|
||||
case 'myfile':
|
||||
$selectedFile = $this->savePath.'PROFILE/'.$out["member_uid"]."/MYFILES/". $out["saved_file_name"];
|
||||
break;
|
||||
}
|
||||
// MAKE SURE FOLDER AS PER PROCESS IS AVAILABLE
|
||||
$selectedFile = $this->savePath.'PROFILE/'.$out["member_uid"]."/MYFILES/". $out["saved_file_name"];
|
||||
|
||||
log_message('critical', "wrenchboard_api-CALL MEDIA selectedFile DATA".$selectedFile );
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user