Heroku file system is ephemeral, meaning Dyno applications can write on the file system but changes are discared when the Dyno restarts.
Dynos restart every 24hrs, even the ones you pay for, so local changes never last.
You must use an external storage: Amazone S3, FTP hosting, Dropbox, etc...
If you are looking for free file storage options I have create a Github repo with some info and references.
There are several alternatives that offer a free tier (limited space) and can be accessed securely (token or credentials) via an API:
- Github (simple, free, unlimited space, suitable for saving few files)
- S3 (most popular, very cheap, suitable for small and very large volumes)
- DriveHQ (free with limited space, FTP hosting)
- Dropbox (free with limited space, great Web UI to manage your files)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…