I already tried validating if the canvas/screenshot worked and it says that it did. I guess the problem is that it isn't uploaded to the directory.
I also already tried enabling the fileUpload option in the Cpanel of the hostinger.
I also tried altering the directory but it still doesnt work, but it works perfectly fine in my localhost.
if($_POST['image'] != null){
$image = $_POST['image'];
$picpath = $_POST['picpath'];
$image_parts = explode(";base64,", $image);
$image_base64 = base64_decode($image_parts[1]);
$fileLocation = "./public_html/SBAdmin2/includes/customuploads/".$picpath;
file_put_contents($fileLocation, $image_base64);
}