i have a URL of an image (on cloud storage) and I want to send the
file from a request. I do not want to redirect because I want to
conceal the cloud URL. So I want to do something like:
but, the url is valid, I can see the file no problem. Is there a way
to send a file from an external source? I want to avoid downloading
the file to my server then resending it to the client.
but, the url is valid, I can see the file no problem. Is there a way
to send a file from an external source? I want to avoid downloading
the file to my server then resending it to the client.
If the file already has a URL then you don't need send_file. Just point
the client's browser at it.
thanks for the response. you'll notice i posted in the original
"because I want to
conceal the cloud URL"
send_file can't do that. I suppose you could write a small rails metal
or embedded Sinatra app that streamed the file to them. You might also
be able to use something like nginx's x-accel-redirect to proxy them
to the URL