I want the app to work like a kind of proxy. The whole point is for the client not to actually hit the remote site
as I say, I'm quite happy to make this a 2 phase thing where: Phase 1: With the first request to pull the file from the remote server and store it via BlobStore (maybe display a blob key) Phase 2: With a second request download the file to the client (using the blob key) On Apr 7, 9:55 am, Phil Young <p...@philyoung.org.uk> wrote: > Why don't you just redirect them to the file and let the hosting server > serve it directly? > i.e. > self.redirect(urlStr) > > Phil > > On 6 April 2011 14:47, fstof <frans.stofb...@gmail.com> wrote: > > > > > > > > > Hi, > > I'm looking for a way that I can open a URLConnection to a file on the > > internet and serve it directly to the browser. > > > something like this (normal servlet) > > String urlStr = req.getParameter("dl"); > > URL url = new URL(urlStr); > > URLConnection con = url.openConnection(); > > InputStream is = con.getInputStream(); > > resp.setContentType(con.getContentType()); > > resp.setHeader("Content-Disposition", "attachment; > > filename=" + > > url.getFile()); > > OutputStream os = resp.getOutputStream(); > > > byte[] buff = new byte[1024]; > > while (is.read(buff) != -1) { > > os.write(buff); > > } > > os.flush(); > > os.close(); > > > Now this works fine for smaller files, but the moment the files are > > larger than 1Mb GAE blocks the Connection to the remote file. > > > now I was thinking of rather than streaming directly to the browser > > client. would it be possible to download the file to the GAE > > BlobStore? > > > Any thoughts > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine" group. > > To post to this group, send email to google-appengine@googlegroups.com. > > To unsubscribe from this group, send email to > > google-appengine+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.