Problem: Reading value along with file upload

Hello, I am trying to upload image files along with some text inputs (email) from an HTML form. File Upload will happen successfully if I remove “$email=$request->post(‘email’);”

I want email because by using email as the primary key I try to insert image path url in DB. Is there any simple way store Url after storing file using “moveUploadedFile()” method??
Here is my code:
`function moveUploadedFile($directory, UploadedFile $uploadedFile)
$extension = pathinfo($uploadedFile->getClientFilename(), PATHINFO_EXTENSION);
$basename = bin2hex(random_bytes(8)); // see
$filename = sprintf(’%s.%0.8s’, $basename, $extension);
$uploadedFile->moveTo($directory . DIRECTORY_SEPARATOR . $filename);
/*$filepath = $directory . DIRECTORY_SEPARATOR . $filename;
switch ($i)
case 1: $colname= “user_photo_url”;

case 2: $colname= “ar_img_url”;

case 3: $colname= “pan_img_url”;

case 4: $colname= “passport_img_url”;

$result_url = DbHandler:: storeurltoDB($email, $filepath, $colname);*/
return $filename;
// return $filename." And File URl path ::".$result_url;
In the above method, I removed $email as part of the argument because it is giving the error. I will pass that later on. Assuming I passed arguements.

Thanks Solved!!! Used $email = $request->getParam('email'); instead of$email = $request->post(‘email’);` THANKS… HAPPY CODING…