简体   繁体   English

将图片上传到Blob存储

[英]upload Image to blob-store

i have uploaded an image to blob-store by applying the example here 我已通过在此处应用示例将图片上传到Blob存储

https://developers.google.com/appengine/docs/java/blobstore/ https://developers.google.com/appengine/docs/java/blobstore/

and it worked just fine.. but when i removed the (index.jsp) file and used a formPanel and (com.google.gwt.user.client.ui.FileUpload) to upload my file it appeared on the datastore Viewer but couldn't see it on screen.help?? 并且它工作得很好..但是当我删除(index.jsp)文件并使用formPanel和(com.google.gwt.user.client.ui.FileUpload)上传我的文件时,它出现在数据存储查看器中,但无法在screen.help上看不到它?

another issue that if i want to view the uploaded image on another view of my project, how can i handle that.. I'm very new to web-application field and need alittle explanation please.. thanks . 另一个问题是,如果我想在项目的其他视图上查看上载的图像,我该如何处理..我对Web应用程序领域是个新手,请稍作解释..谢谢。

The FormPanel use an hidden iframe for send form request. FormPanel使用隐藏的iframe发送表单请求。

You can use a NamedFrame : 您可以使用NamedFrame:

String actionUrl = getActionURLFromServer();
NamedFrame frame = new NamedFrame("iframe");
frame.setSize("400px","600px");
final FormPanel form = new FormPanel(frame);
form.setEncoding(FormPanel.ENCODING_MULTIPART);
form.setMethod(FormPanel.METHOD_POST);
form.setAction(actionUrl);
FileUpload upload = new FileUpload();
upload.setName("myFile");
upload.addChangeHandler(new ChangeHandler() {
  void onChange(ChangeEvent event) {
    form.submit();
  }
});
form.setWidget(upload);
RootPanel.get().add(form);
RootPanel.get().add(frame);

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

相关问题 如何将图像上传到Azure中的blob? - How to upload an image to a blob in Azure? 使用Java将图像作为Blob上传到sql数据库 - Using java to upload an image as a blob to an sql database 无法将图像上传到azure blob存储android - Unable to upload image to azure blob storage android JAVA-以固定大小存储图像Blob - JAVA - store an image blob with a fixed size 如何将在 mysql 中存储为 blob 的图像上传到 AWS S3 存储桶 - How to Upload Image stored as blob in mysql to AWS S3 bucket 如何将图像存储为BLOB,然后在由Play!驱动的网站中显示? - How to store an image as BLOB and then display in Play!-powered website? 我可以将包含大量数据的外部 URL 上传到 App Engine Blob 商店吗? - Can I upload an external URL containing a lot of data to App Engine blob store? 从 AzureDevops 存储库获取一些文件并将它们上传到 Azure Blob Store 的容器的有效方法 - Efficient way to get some files from AzureDevops repository and upload them to Azure Blob Store's container 将byte []存储在BLOB Oracle中 - Store byte[] in BLOB Oracle 将图像上传到服务器并将带有文本值的路径存储到 MySQL 中 - Upload image to server and store path with text values into MySQL
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM