generate functionWed, 01 Mar 2023

rails download remote file to temp file

require 'open-uri' def download_file(url) download = open(url) IO.copy_stream(download, "/tmp/file") end

Questions about programming?Chat with your personal AI assistant