[ad_1]
I have been triggering AJAX funtctionality and part of my function is
private function saveImageOfThePlace()
{
$image_name = $this->json['order']['image_temp']; // phpBDobOY
$ext = $this->json['order']['ext']; // jpg
$full_path="wp-content/plugins/WindProofCurtainsCalculator/Temp/".$image_name.'.'.$ext;
$new_path="wp-content/plugins/WindProofCurtainsCalculator/uploaded_images/".$image_name.'.'.$ext;
if ( file_exists($full_path) ) {
//copy($full_path, $new_path);
unlink($full_path);
}
// move_uploaded_file($_FILES['image']['tmp_name'], plugin_dir_path( dirname( __FILE__, 2 )).$this->json['order']['image']);
return $this;
}
I can see everything else is working correctly, but only I am stuck at this part.
I want to move image to another folder and if anyone can help me will be very thankful!
[ad_2]