Help: How do you transfer a PDF File from S3 to a local desktop file directory when the rails app is deployed in Pivotal Cloud Foundry? Using ruby and the aws-sdk to download a PDF File from S3 to local client machine directory.
get_object(bucket: @s3_bucket, key: file_name, response_target: "#{Rails.root}/Downloads/#{file_name}")
The above ruby code works. The file appears inside the Download Directory on the Mac. Problem: deploying the rails app into Pivotal Clown Foundry breaks the placement of the PDF File and where it gets stored. It seems as if get_object returns the PDF to the Cloud Foundry Container in directory in "/home/vcap/app" rather than getting pulled down to the user's remote computer file directory. But that's not available to the person to open up the file.