简体   繁体   English

从 Google App Engine 的本地驱动器将图像存储在数据存储区中

[英]Store Images in datastore from local drive in Google App Engine

I couldn't find articles match to my requirements.我找不到符合我要求的文章。

Basically, what I want is that:基本上,我想要的是:

  1. User uploads picture to the application from their local drive.用户从他们的本地驱动器上传图片到应用程序。
  2. Application stores the picture uploaded to datastore.应用程序存储上传到数据存储区的图片。
  3. Application retrieves images from datastore.应用程序从数据存储中检索图像。

Any suggestions?有什么建议么? Urgent.紧迫的。

That's exactly what is discussed in the documentation for the BlobStore API .这正是BlobStore API 文档中讨论的内容

You can do this in much the same way as you would in any other framework or platform: Create an HTML form with a 'file' input and the mimetype set to 'multipart/form-data'.您可以像在任何其他框架或平台中一样以几乎相同的方式执行此操作:创建一个 HTML 表单,其中包含“文件”输入并将 mimetype 设置为“multipart/form-data”。 On the server side, extract the file data from the form field (using self.request.POST['fieldname'].value in webapp) and store the contents in a datastore model, in a db.BlobProperty field.在服务器端,从表单字段中提取文件数据(在 webapp 中使用self.request.POST['fieldname'].value )并将内容存储在数据存储区 model 的db.BlobProperty字段中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google App Engine:从数据存储区检索图像 - Google App Engine: Retrieving images from the datastore 将App Engine数据存储中的数据导出为Google云端硬盘电子表格 - Exporting data from App Engine datastore as a Google Drive spreadsheet 如何在Java中从谷歌应用引擎的数据存储区存储和检索图像文件 - How to store and retrieve images files from datastore of google app engine in Java Google App Engine本地数据存储区的IllegalStateException - IllegalStateException with Google App Engine Local Datastore Google App Engine:显示存储在数据存储区中的图像 - Google App Engine: Displaying images stored in the datastore 将图片迁移到Google App Engine数据存储区或Blobstore - migrating images to google app engine datastore or blobstore 如何在 Google App Engine 中重新加载本地数据存储 - how to reload local datastore in Google App Engine 将数据从产品数据存储区传输到Google App Engine(Python)中的本地开发环境数据存储区 - Transferring data from product datastore to local development environment datastore in Google App Engine (Python) 如何将本地Google App Engine Python数据存储区复制到本地Google App Engine Java数据存储区? - How do I copy local Google App Engine Python datastore to local Google App Engine Java datastore? Google App Engine中的数据存储 - Datastore in Google App Engine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM