Manually Do Upload in ActiveStorage in Rails Console Feb 7th, 2023 • Permalink Upload file is at local: rails consolea=Article.last a.download_file.attach(io: File.open("/home/deployer/Manual.docx"), filename: "使用手册区.docx") Upload file is at remote: rails consolefile = URI.open(remote_file_full_url) a=Article.last a.download_file.attach(io: file, filename: remote_file_name)