mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Merge pull request #2038 from NextHub/master
Fixed base_url duplication in FileField.use_url
This commit is contained in:
commit
a40b805963
|
@ -1007,7 +1007,7 @@ class FileField(Field):
|
|||
if self.use_url:
|
||||
if not value:
|
||||
return None
|
||||
url = settings.MEDIA_URL + value.url
|
||||
url = value.url
|
||||
request = self.context.get('request', None)
|
||||
if request is not None:
|
||||
return request.build_absolute_uri(url)
|
||||
|
|
Loading…
Reference in New Issue
Block a user