I am using cloudinary to upload images on my Laravel application. When I try to upload images using my mobile device, I get this error:-
Cloudinary\Error: Missing required parameter - file
When I try uploading from my laptop, it works well. This is my code:
$photos = $request->file;
if(isset($request->file)){
foreach ($photos as $photo){
$file = $photo;
Cloudder::upload($file->getPathname());
$response = Cloudder::getResult();
$path = $response['secure_url'];
$publicId = Cloudder::getPublicId();
$file_size = $file->getClientSize();
//create record
}
}
Please what might be the problem?