I have uploaded a file using Laravel s3 driver configured for Digital Ocean space. Now I want to download the file using an api request. The code for the download is:
return \response()->download(Storage::disk('do')->url($user->cv), $user->name);
It gives me an error response saying
The file "https://lms3.fra1.digitaloceanspaces.com/answers/3/ygcFuQfmVgdcxWRteE3hTlF0CuntsycSQmuDystT.pdf"
But the file actually exists and you can check this link. What is wrong with this code?