A
A
Alexey Dzyuba2017-10-12 19:46:46
PHP
Alexey Dzyuba, 2017-10-12 19:46:46

PHP on a server like Heroku - what's the data structure there?

Noob question.
In general, I have an application in PHP + MySQL. The user uploads his pictures and they are displayed on the site. I display them through the img/ folder on my computer. But on Heroku, when a user uploads an image, it is visible for several hours. Then he disappears. That is, as I understand it, nothing is saved in the img / folder. It looks like the pictures are stored in some localStorage or somewhere else ...
So how can I see where the pictures are saved?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
codegenesis, 2017-10-21
@Alex_Dz

Heroku does not allow you to store files for a long time.
You need to connect an external storage service AWS S3 or equivalents.
PHP manual here: https://devcenter.heroku.com/articles/s3-upload-php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question