I am using this code and filename save it as upload.php as follows:
But after submitting the form through html and where to pass uploaded_file (i.e.,) $_FILES['uploaded_file']['tmp_name'] and $_FILES['uploaded_file']['name'] in backend how to use.
require_once 'vendor/autoload.php';
$config = new \Flow\Config();
$config->setTempDir(storage_path() . '/temp');
$destination = 'uploads/';
$file = new File($config);
$request = new \Flow\Request();
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if ( ! $file->checkChunk() ) {
return \Response::make('',204);
}
} else {
if ($file->validateChunk()) {
$file->saveChunk();
} else {
return \Response::make('', 400);
}
}
if ($file->validateFile() && $file->save($destination . $request->getFileName())) {
return \Response::make('File upload was completed', 200);
}
Hi,
I am using this code and filename save it as upload.php as follows: But after submitting the form through html and where to pass uploaded_file (i.e.,) $_FILES['uploaded_file']['tmp_name'] and $_FILES['uploaded_file']['name'] in backend how to use.
require_once 'vendor/autoload.php';
$config = new \Flow\Config(); $config->setTempDir(storage_path() . '/temp'); $destination = 'uploads/'; $file = new File($config); $request = new \Flow\Request();