N
N
Nodir Malikov2021-08-27 09:27:37
Django
Nodir Malikov, 2021-08-27 09:27:37

How to properly upload a photo with a directory in Django to save it to the Selectel cloud?

I load using the library: django-selectel-storage
There is a class:

class News(models.Model):
    photo = models.ImageField(upload_to='media', verbose_name='Фото')


The photo is correctly loaded into the container and the folders are created correctly, but if you try to access them, "Not Found" is displayed.

UPD: If you upload without upload_to, then everything works.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question