I'm working in an API with Django Rest Framework and I need to store the full URL for an image in my db. I think in that way is easiest to send it via json.
I receive the image from POST request. I am using a RESTfull tool client to test, I get something like this in the view post
method:
<InMemoryUploadedFile: profile_1.jpg (image/jpeg)>
In my model I have this:
photo_url = models.URLField(null=True)
My original idea was store it in a external server and store the url, but now I need to store the image in my own server but store only the url in my db. How can I achieve this? Thanks!