mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 11:33:59 +03:00
.to_native() now returns the file-name.
This commit is contained in:
parent
c35b9eb065
commit
e112a806d8
|
@ -952,10 +952,7 @@ class FileField(WritableField):
|
|||
return data
|
||||
|
||||
def to_native(self, value):
|
||||
"""
|
||||
No need to return anything, the file can be accessed form its url.
|
||||
"""
|
||||
return
|
||||
return value.name
|
||||
|
||||
|
||||
class ImageField(FileField):
|
||||
|
|
Loading…
Reference in New Issue
Block a user