I am using the Carrierwave gem inside of Magnific Popup (lightbox). What I want to do is that after uploading a image that it will show the newly uploaded i
you are doing this very complicatedly..
this is the simple solution.Write javascript function to send the selected image using ajax.
++++++++++++++++++++++++++++++++++++++++++++++++++++
In Html file write the below code to upload the file..
++++++++++++++++++++++++++++++++++++++++++++++++++
in php file use the below code small_img.php
$path = "/var/www/upload/profile_pic/";
if(move_uploaded_file($tmp, $path.$actual_image_name))
{
echo "
";
}
this works for me...try it.. make some changes according to your code