Upload Service image Php issue

0 votes

Dear Sirs, 

I'm experiancing a problem trying to upload a file by Php:

$filenamepath ="test.jpg";
if (file_exists($filenamepath)) {
 
                try {
 
$upload = $uploadService->uploadFile("test.jpg", $filenamepath, UploadFileType::IMAGE, "Image for Category #");  
                        $fileList = $upload->getFileList();
                        
                        
                         foreach($fileList as $files )  {      
                        print_r("FileName is : ".$files->getName());      
                        print_r("Type is : ".$files->getType() );      
                        print_r("Url is : ".$files->getUrl() );      
                        print_r("TinyUrl is: ".$files->getTinyUrl() );      
                        print_r("Description is: ".$files->getDescription());  
                                        }     
                            $jsonResponse = $upload->toString();
} catch (App42Exception $e) {
print_r($e);
$error = "Oops. Error while uploading a file... Please try again.";
}
    
} else {
    
    echo "not exist";

 

}
 
We check the file, if exists, but we get always "The Request parameters are invalid. The parameter 'File' cannot be null or empty".
 
Can point us in the right direction?
 
Thanks in advance,
Valeria Sinnati.
 
asked Mar 9, 2018 in PHP by lab (10 points)

1 Answer

0 votes
Hi,

I have forwarded this to development team. I will get back to you as soon as possible.

Thanks.
answered Mar 12, 2018 by rajeev.etc (1,660 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...