Upload Resize/Compress images pdfs/rename file
I have created a web form that uploads a file that could be a pdf or image. How can I display an error message if the upload doesn't work. Maybe the file is too large. Another question is there a way to compress a pdf or shrink an image on upload.
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "cards",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "600",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
If these are possible, what are my settings in the above code?