test file path
This commit is contained in:
@@ -469,6 +469,9 @@ class WrenchApi extends BaseController
|
|||||||
if ( $endpoint == 'uploads'){
|
if ( $endpoint == 'uploads'){
|
||||||
$local_out=["test_msg"=>'Yes the upload endpoint was hit********'];
|
$local_out=["test_msg"=>'Yes the upload endpoint was hit********'];
|
||||||
$call_backend = false; // will be decided after file is saved
|
$call_backend = false; // will be decided after file is saved
|
||||||
|
$fl_in=[];
|
||||||
|
$ll = ( new \App\Models\UploadManager() )->reciveUpload($fl_in, $local_out);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (isset($_FILES) && is_array($_FILES) && count($_FILES)>0) {
|
if (isset($_FILES) && is_array($_FILES) && count($_FILES)>0) {
|
||||||
$raw_array = array_merge($_POST,$_FILES);
|
$raw_array = array_merge($_POST,$_FILES);
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
|
class UploadManager extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
public $savePath ="//10.0.0.40/wrenchboard/TEST/";
|
||||||
|
public function reciveUpload($in,$out){
|
||||||
|
|
||||||
|
mkdir($this->savePath.rand(10000,999999), 0777, true);
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user