我有*我想*包含圖像blob的模型。我在本地文件系統上有圖像,但由於我的應用程序的性質,我需要將它們放入數據存儲區。這裏是我的模型:如何批量上傳Google App Engine中的圖片BLOB?
class JeanImage(db.Model):
type = db.StringProperty(required=True, choices=set(["main","front","back","detail"]))
image = db.BlobProperty(required=True)
我還沒有嘗試過任何東西,因爲我在處理圖像時不太好。
如何將圖片轉換爲blob,以便我可以將它們放入我的bulkupload csv文件中?
馬克