简体   繁体   English

谷歌应用引擎无法仅在生产中获取 blob 密钥

[英]google app engine not able to get blob keys in production only

I have hit a snag that i can not seem to solve.我遇到了一个我似乎无法解决的障碍。 My issue is with retrieving the blob key after the app engine has called my service back.我的问题是在应用引擎调用我的服务后检索 blob 键。 I have tried using blobstoreService.getUploads(request) and i have also tried pulling the blob key from the input stream on the request that is called back to me.我曾尝试使用blobstoreService.getUploads(request)并且我还尝试从回调给我的请求的输入流中提取 blob 键。

the really strange part is that if i go look into the dashboard i see all of my images in the blob store data view.真正奇怪的部分是,如果我查看仪表板,我会在 blob 存储数据视图中看到我的所有图像。

I get this error no matter how i try to get the blob keys out :无论我如何尝试取出 blob 键,我都会收到此错误:

com.google.apphosting.utils.servlet.ParseBlobUploadFilter doFilter: Could not parse multipart message: javax.mail.internet.ParseException: Missing ';' com.google.apphosting.utils.servlet.ParseBlobUploadFilter doFilter:无法解析多部分消息:javax.mail.internet.ParseException:缺少“;”

I am really hung up on this one and i could really use a little help.我真的很喜欢这个,我真的可以用一点帮助。

EDIT more of the code编辑更多代码

the fetch of the blob store url blob 商店网址的获取

private String fetchUrl()
{
    String url = blobstoreService.createUploadUrl("/BS/returnKey");
    return url;
}

snippit of the return code where the error occurs发生错误的返回代码的片段

...
if(inUrl.contains("returnKey"))
{
    Map<String, List<BlobKey>> blobs = blobstoreService.getUploads(req);
...

so in my dev environment (the development app server packed in with GAE plugin for eclipse), it works fine, but then after i deploy to the app engine, the same code will not work.所以在我的开发环境中(开发应用服务器打包了用于 Eclipse 的 GAE 插件),它工作正常,但是在我部署到应用引擎之后,相同的代码将无法工作。 I also tried pulling the data out of the Input stream from the request with teh same results (working on the dev , not on the prod).我还尝试从具有相同结果的请求中从 Input 流中提取数据(在 dev 上工作,而不是在 prod 上工作)。

thanks to everyone for your help!感谢大家的帮助!

The issue was that you can not have spaces in the id of the input on the form.问题是表单输入的 id 中不能有空格。 I feel like there should be a more obvious error.我觉得应该有一个更明显的错误。

In any event i hope that someone finds this useful!无论如何,我希望有人觉得这很有用!

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM