File upload

This commit is contained in:
CHIEFSOFT\ameye
2023-06-02 16:08:59 -04:00
parent 47782693ba
commit 14cab76805
3 changed files with 72 additions and 5 deletions
+3 -2
View File
@@ -6,7 +6,7 @@ use CodeIgniter\Model;
class UploadManager extends Model
{
public $savePath ="/opt/wrenchboard/TEST/"; ////10.0.0.40/wrenchboard/TEST/";
public $savePath ="/opt/wrenchboard/TEST/";
public function reciveUpload($in,$out){
$action = $in["action"];
@@ -35,7 +35,8 @@ class UploadManager extends Model
}
if (file_exists($thisContactFolder)) {
$out["message"] = rand(100,999)."-".$in['file_name'];
$tt_d = date('hisjmy');
$out["message"] = $tt_d."-".$in['file_name'];
$thisContactFolderFileName = $thisContactFolder.'/'.$out["message"];
$myfile = fopen($thisContactFolderFileName, "w") or die("Unable to open file!");
$file_data = base64_decode($in["file_data"]);