generate functionWed, 01 Mar 2023

rails download remote file

def download_file(remote_url, local_path) File.open(local_path, 'w') do |file| file.write(HTTParty.get(remote_url)) end end

Questions about programming?Chat with your personal AI assistant