I need to set direct link of files uploaded to AWS S3 server. I am using url_for(Model.first.image)
. But it first links to server path and then redirects to S3 Bucket path.
I have also tried the below code, but it's not working
Model.first.image.service_url
It throws error:
URI::InvalidURIError (bad URI(is not URI?): nil)