File posting via RESTful api with django and tastypie

前端 未结 2 1563
野的像风
野的像风 2021-02-08 16:37

i am creating an RESTful api for a Django website. I am using tastypie for doing it. My problem is i could\'nt design how to post images or files via this api. I mean, to create

2条回答
  •  孤城傲影
    2021-02-08 16:54

    Look here: https://github.com/toastdriven/django-tastypie/issues/42

    Looks like there were approaches todo that, but aren't working quite well.

    After a long time playing around with various solutions ( https://github.com/klipstein/django-tastypie/commit/e0f86ddffeb46c77704328a3b5899ec08e18e4eb, https://github.com/klipstein/django-tastypie/commits/form-data) doing file-handling within tastypie I came to the conclusion that this can't be solved elegantly if you want to support file uploads from every browser.

    Have a look on this fork

    https://github.com/ff0000/django-tastypie/commit/1fbc0a

提交回复
热议问题