I could not find the solution i wanted to this question. I ended up using Ruby Tempfile class which will download external files to my server in a temp folder and delete garbage collect once its done.
There is a great explanation of how to use this class here