Answer the question
In order to leave comments, you need to log in
How to set a unique upload_to path when saving an image?
Hello.
The situation is as follows:
- the user enters his picture
- a view is made from the picture (easy thumbnails - gives them all the same name).
- The picture is saved in the ImageFiled field of the user's profile
As a result, a situation is obtained when each subsequent user uploads his avatar and overwrites the previous picture.
I did not find how to set a unique name for easy-thumbnails, so I want to know how to make a unique path for "upload_to" I
found in the documentation - year, month, day, but I would like something like user id - is this possible?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question