jeudi 22 janvier 2015

Amazon EC2, Elastic Beanstalk: My images dissapear

I have deployed my PHP application in amazon EC2 using elastic beanstalk instance. The filesystem structure of my app looks like this:



MyApp
|-css
| |-...
|-js
| |-...
|-uploads
| |- image.png
| |- file.pdf
| |- ...
|-index.php
|-...


My app allows users to upload images. Its a simple application to web-manage some files and is currently only used by my client. So when files are uploaded I am placing them under uploads folder as shown above. Problem is my files don't last in this folder for long. After a day or two,I ssh and find the uploads folder is empty. I am not sure what happens but I suspect elastic beanstalk does create a new instance and consequently overwrites the uploads folder contents.


How do I fix this situation?


Thanks.





Aucun commentaire:

Enregistrer un commentaire