Great, seems interesting, I will give this a try. Thanks. On Sun, Aug 30, 2009 at 6:31 PM, uud ashr <uuda...@gmail.com> wrote:
> Hi all > Just want to share. > If you have problem with file upload on Google App Engine, I just done some > experiment and it works. > Use the attached files. > I didn't create this, I just modify from the existing wicket source code. > > I create new class, GaeSafeServletWebRequest which is subclass of > ServletWebRequest. Everyting come from here. > > The key is remove the thread that clean the ReferenceQueue. So how to clean > it? I use something called FileCleaner.reapFiles(2) that will poll the queue > maximum 2 item. I put those line of code everytime GaeSafeServletWebRequest > created. > > to use, you only need to override method *newWebRequest* on your wicket > application > > @Override > > protected WebRequest newWebRequest(final HttpServletRequest > servletRequest) { > > return new GaeSafeServletWebRequest(servletRequest); > > } > > > When you upload something, then write it using *DatastoreOutputStream*, it > will put all the bytes to GAE (Google App Engine) datastore. This > OutputStream already handle the over size, so it will create chunk files in > order to save the big file size. > > Please tell me if it works for you (actually it works for me) and maybe we > can refine or create the better code. Or maybe we can add this to wicket? So > wicket can be "FULL COMPATIBLE" to Google App Engine. > > Regards, > uudashr > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Daniele Dellafiore http://blog.ildella.net http://twitter.com/ildella