I need to add user agent to this code, its because I can’t dowload some files with error ‘HTTP request sent, awaiting response… 406 Not Acceptable.’
$image_data['http_image_path'] = Storage::instance('images')->getUrl($path . '/' . $image_name, 'http', $url);
I tried this but its not working
headers={"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36"}
$image_data[‘http_image_path’] = Storage::instance(‘images’)->getUrl($path . ‘/’ . $image_name, ‘http’, $url, headers=headers);
`