FileField returns relative url (instead of absolute) inside serialized data returned by SerializerMethodField #9620
Unanswered
ZeroAurora
asked this question in
Potential Issue
Replies: 1 comment 4 replies
-
Have you tried to set the |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Example code: https://github.com/ZeroAurora/drf-nested-file-serializaion-issue
When returning a serializer's data from a SerializerMethodField, the FileField of the serializer returns a relative url . However I guess it should be an absolute one, because when the model containing the file is directly serialized, the returning data contains an absolute url.
The problem above is demonstrated in the README.
Is it expected or a bug?
Beta Was this translation helpful? Give feedback.
All reactions