I have a profile database for users in which I save their profile image. I am using DRF to create API's for this. Now when I save the profile data, it return JSON as:
{
"branch": "CSE",
"year": 2014,
"image": "static/profile_images/abhishek.jpg"
}
this data gets saved in database and even the image get uploaded to the desired folder. Now I want to access this image in the frontend(I am creating an android app in Ionic), so that the profile pic is viewed in the app's dashboard. How do I do it? At present simply going to the saved path is not working.
static? Django convention is to save it inmediadirectory. For a personal project it's okay, but down the line if you decide to share your project with someone or have someone collaborate with you on it, then it would lead to many confusions.