i have issue regarding image capture from the following code below in web host and also this code is capturing image in local host and storing the image to the folder but in web host it does not i do not have any error showing up in web-host please can some one help me . iam using codeigniter framework
// [4] WHEN WE CLICK ON "TAKE PHOTO" BUTTON
take.addEventListener("click", function(){
// Create snapshot from video
var draw = document.createElement("canvas");
draw.width = video.videoWidth;
draw.height = video.videoHeight;
var context2D = draw.getContext("2d");
context2D.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
// Upload to server
draw.toBlob(function(blob){
var data = new FormData();
data.append('upimage', blob);
var xhr = new XMLHttpRequest();
xhr.open('POST', "User/adde", true);
xhr.onload = function(){
if (xhr.status==403 || xhr.status==404) {
alert("ERROR LOADING 3-UPLOAD.PHP");
} else {
alert(this.response);
}
};
xhr.send(data);
});
});
})
controller
$upimage = $this->input->post("upimage");
$filename = time() . '.jpg';
$file="upload/".$filename;
$filepath=FCPATH.'upload/'.$filename;
$result=(move_uploaded_file($_FILES['upimage']['tmp_name'], $filepath));