WadeeaKiwan / HackYourSocial-Project-Class20

Project Class 20
https://hackyoursocial.herokuapp.com/
0 stars 0 forks source link

Uploading photo’s #3

Open WadeeaKiwan opened 3 years ago

WadeeaKiwan commented 3 years ago

For everyone who is asking why the photos of the posts are deleted after a couple of hours or max a day.

All Heroku applications run in a collection of lightweight Linux containers called dynos.

The dyno manager restarts all your app’s dynos whenever you:

Dynos are also restarted (cycled) at least once per day to help maintain the health of applications running on Heroku. Any changes to the local filesystem will be deleted. The cycling happens once every 24 hours.

In this way, our feature of uploading photos is working properly but Heroku stores the photos temporarily.

For more information you can read this article: https://devcenter.heroku.com/articles/dynos#dyno-lifecycle-latencies

The Solution: The solution is to use a service that supports uploading and storing files somehow always which AWS S3 (Amazon Web Services) provides to us. We need to make an account that says it's free but it asks for a credit card. https://aws.amazon.com/

The Result: We don't need that service for now as the functionality of the feature is working properly. It's enough for the presentation. But if we can make an account, then maybe we can integrate that service to our application.

WadeeaKiwan commented 3 years ago

I updated our project to work with Amazon Web Sevices AWS S3, which is now working properly with the feature of upload photos. So, you can now upload photos and they will not be deleted anymore. Done