This commit is contained in:
Kasper Rynning-Tønnesen
2015-11-28 20:23:54 +01:00
parent 8a2814e5a6
commit fd6285601f
4 changed files with 13 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ $output = $image->getimageblob();
$image->setImageFormat("jpeg");
file_put_contents ("/images/thumbnails/".$_POST['id'].".jpg", $image);
file_put_contents ("/static/images/thumbnails/".$_POST['id'].".jpg", $image);
echo base64_encode($output);
?>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -138,6 +138,15 @@ var Nochan = {
//$(".room-namer").css("opacity", 1);
},500);
}else{
var img = new Image();
img.src = "/images/thumbnails/"+id+".jpg";
img.onerror = function(){ // Failed to load
console.log("didn't find");
};
img.onload = function(){ // Loaded successfully
console.log("found");
};
$.ajax({
type: "POST",
data: {id:id},