我通读了this link并对我如何在项目中集成 blobstore api 感到困惑。
我在WEB-INF文件夹下添加了appengine库,我从上面发布的链接中复制了上传和服务的代码示例。我添加了tomcat服务器并测试了样本servlet程序,它工作正常。
但是当我测试代码时它会抛出我
HTTP Status 500 - Must be called from a blob upload callback request.
type
Exception
report
message must be called from a blob upload callback request.
description
The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.IllegalStateException: Must be called from a blob upload callback request.
com.google.appengine.api.blobstore.BlobstoreServiceImpl.getUploads(BlobstoreServiceImpl.java:169)
com.google.appengine.api.blobstore.BlobstoreServiceImpl.getUploadedBlobs(BlobstoreServiceImpl.java:152)
my.Upload.doPost(Upload.java:34)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
我不知道如何添加blobstore服务。 我想要得到的只是能够上传图像并获得一个blob类型,我将转换为位图并放在imageview上。这里出了什么问题,我该如何解决这个问题?