[appengine-java] No Filename when serving a blob
Hello, when i serve a file saved in the Blobstore using its BlobKey the filename- and extension are missing, files get named "Download" always. I use the Serve Servlet from http://code.google.com/appengine/docs/java/blobstore/overview.html If i directly redirect from the Upload Servlet to the Serve Servlet, the filename of the Download is correct. I use this code to call a serve: Download and the standard Serve Servlet from the docs. any suggestions to get the filenames and extensions? Greets! -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] GWT and GAE: Uploading Files to Blobstore
Hey Folks, i try to upload files using GWT and GAE (Blobstore). Adding data to the Datastore works fine already. When i click "Upload/Submit" it opens a new Browser Window and it tries to open http://xy.appspot.com/_ah/upload/saufdsgfdsfd98gdf89gfdgzfdg9fd78zf8f89fh3hhf938fj37f4 After a few seconds it ends with HTTP ERROR 500 with a Java Heap Exception. Here is my Code: com.xy.client.MyProject.java (...) final FormPanel form = new FormPanel(); form.setEncoding(FormPanel.ENCODING_MULTIPART); form.setMethod(FormPanel.METHOD_POST); fileService.getUploadURL(new AsyncCallback() { public void onFailure(Throwable error) { } public void onSuccess(String url) { form.setAction(url);// <<<- BLOBSTORE.REQUESTUPLOADURL HERE! } }); (...) myButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { form.submit(); } (...) com.xy.server.FileServerImpl.java (...) private BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); public String getUploadURL() { String url = new String(); url = blobstoreService.createUploadUrl("/xy/upload"); return url; } (...) com.xy.server.UploadFileServlet.java (...) public class UploadFileServlet extends HttpServlet { private BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { Map blobs = blobstoreService.getUploadedBlobs(req); BlobKey blobKey = blobs.get("pdfFile"); } } (...) web.xml (...) fileService com.gcx.gcpub.server.FileServiceImpl uploadFileServlet com.gcx.gcpub.server.UploadFileServlet fileService /gcpub/pdf uploadFileServlet /gcpub/upload (...) I tried everything and I think I nearly read every thread on the web handling this topic. Without GWT (if i use a JSP instead) it perfectly works, it opens no new browser window and i even don't see the upload URL generated by blobstoreService.createUploadUrl("/xy/upload"). Is it not possible to use a HttpServlet here to save the file to the Blobstore? Can you tell me where is my mistake? I'm very thankful for any help! The docs for GWT and GAE are very good, doing some tutorials directly pushes you the right way. Sadly there isn't as much good stuff for combining GWT and GAE (don't even books). -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: GWT and GAE: Uploading Files to Blobstore
if I don't use a FormPanel and form.submit but plain HTML stuff instead, uploading files to the blobstore works fine! com.xy.client.MyProject.java (...) fileService.getUploadURL(new AsyncCallback() { // <<<- BLOBSTORE.REQUESTUPLOADURL HERE! public void onFailure(Throwable error) { } public void onSuccess(String url) { upUrl = url; }}); String uploadForm = ""; mainPanel.add(new HTML(uploadForm)); (...) everything else is the same! Can anyone explain this to me? Why does the usage of FormPanel and form.submit() end up in "Uncaught exception from servlet java.lang.OutOfMemoryError: Java heap space"? Is there a workaround to fix this? -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: GWT and GAE: Uploading Files to Blobstore
i even tried to upload very small files (~4kB), same exception ... -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: App Engine SDK 1.3.7 bugfix release
+2 same thing here! On Sep 1, 1:43 pm, timwhunt wrote: > +1 - I'm wondering the same thing > > On Aug 31, 9:14 pm, Sekhar wrote: > > > > > Eclipse is still showing 1.3.6...any ETA on that? -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] File size when downloading files is missing
Hello, when serving files from the Blobstore with blobstoreService.serve(blobKey, res) the original filename and the filesize is missing, so no download progress bar and calculations how long the download will last is possible. How can i fix this? -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: File size when downloading files is missing
Am i really alone with this problem? blobstoreService.serve(blobKey, byterange, res) doesn't work either. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: File size when downloading files is missing
So, i've played a bit and tested some things. Before serving the blobkey i now set the header of the respond this way: res.setHeader("Content-Length", Long.toString(blobInfo.getSize() )); res.setHeader("Content-Size", Long.toString(blobInfo.getSize() )); Setting the header works, the respond says: HTTP/1.1 200 OK Content-Size: 66882 Content-Type: application/pdf Date: Mon, 25 Oct 2010 08:10:15 GMT Server: Google Frontend Content-Length: 66882 Connection: close But, all my browsers (I've testest with Safari, Firefox and Chrome) still are not able to determine the filesize when downloading... Do you have any idea what else i can try? -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.