PHP download is not working on mobile devices but it is perfectly working on PC.. This is my code...
session_start();
$path = 'editedPic/';
$image = $_REQUEST['image'];
$mainimage = $path.$image;
$username = $_SESSION['username'];
$string = preg_replace('/\s+/', '', $username);
header('Content-Type: image/jpg');
header('Content-Disposition: attachment; filename="'.$string.'.jpg"');
readfile($mainimage);