Android-Django Image upload

后端 未结 2 1845
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-08 02:26

I am trying to upload image with android as frontend and django as backend.

The model:

    class Photo(models.Model):
        title = mo         


        
2条回答
  •  無奈伤痛
    2021-02-08 03:05

    Should be urlString = "http://192.168.1.2/photos/upload";

    But then if it doesn't work, you'll get a different error, and we'll probably need that error to answer further.

    Also, it looks like you don't have a real boundary string set and you aren't using it correctly.

    Have a look here. Notice how he uses a unique boundary string and writes it to the output stream?

提交回复
热议问题