Sending images to google cloud storage using google app engine

前端 未结 2 705
慢半拍i
慢半拍i 2020-12-20 01:34

I wrote a simple webapp using google app engine in python that allows users to upload images and have it stored somewhere (for now I\'m just using the blob store based on th

2条回答
  •  一向
    一向 (楼主)
    2020-12-20 01:44

    There isn't a difference between a binary stream and a text stream in cloud storage. You just write strings (or byte strings) to the file opened in "a" mode. Follow the instructions here.

    Also, if you are serving images from the blobstore, you are probably better off using get_serving_url() from here, although that depends on your application.

提交回复
热议问题