The command File.read(file_url) in the code below won't work because I'm trying to pull down a file such as (example - file_url= 'http://placecorgi.com/100/100.pdf') which is not a file but a file on a server.
What do I need to change to pull down this file from AWS and send through UserMailer?
class UserMailer < ActionMailer::Base
def send_user_pages(user, file_url)
@user = user
attachments["user_pages.pdf"] = File.read(file_url)
mail(to: user.email, subject: 'Your Pages')
end
end