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.