Please see the documents :
Ephemeral file system
Each dyno gets its own ephemeral file system with a fresh copy of the most recently deployed code. During the dynos life cycle, its running processes can use the file system as temporary notebook memory, but no files that are written are visible to processes in any other dyno, and any recorded files will be discarded when dyno stops or restarts.
Thus, you cannot save a lot with your Heroku dinar. Especially after you click on your new version, dyno will reboot, and the file system will reset.
You need to store the files in a remote place, and then if they need to survive dyno reset.
hakre
source share