display image attach from couchDB in html via flask/python

后端 未结 2 1490
梦毁少年i
梦毁少年i 2021-01-17 04:55

I\'m tying to get an image attachment from couchdb using flask & python then pass the image to imgurl.html to be displayed. The problem is that I\'m only get this:

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-17 05:34

    Before I saw @SHC's answer I managed to come up with a solution my self. What I did was retrieve the name of the attachment and then append that to the end of a url like i.e "http:localhost:5984/dbName/docId/attachmentName". I passed that url to the html img src and it worked then. Thank you you @SHC for your answer. sorry I didnt see it sooner.

提交回复
热议问题