У меня есть поле для изображения с использованием django-rest-framework Как обработать загрузку изображений по API?django-rest-framework и загрузка изображений
Есть ли примеры?
models.py
image = models.ImageField(
upload_to="profiles",
height_field="height",
width_field="width",
null=True,
blank=True,
editable=True,
help_text="Profile Picture",
verbose_name="Profile Picture"
)
height = models.PositiveIntegerField(null=True, blank=True, editable=False)
width = models.PositiveIntegerField(null=True, blank=True, editable=False)
http://stackoverflow.com/questions/ 11398696/upload-image-to-imagefield-with-djangorestframework-using-json-and-test-this-wit – catherine