Working with tempfiles
30-Jan-2020 3722
A while back, I needed to create XML files, send them to a distant server and delete them once the transfer completed.At first, I thought about creating those files into my app’s tmp directory. Then, a cron job would run daily to delete them. It would have worked, but I wasn’t very happy with it.So after looking on the internet, I came across the Tempfile object (and I - for the umpteenth time - rejoiced in using Ruby).
Working with tempfiles #ruby #rubydeveloper #rubyonrails #Working #tempfiles https://rubyonrails.ba/link/working-with-tempfiles