appengine-magic icon indicating copy to clipboard operation
appengine-magic copied to clipboard

Writing (and reading) files to the blobstore throws an error

Open colemc opened this issue 12 years ago • 3 comments

First off, I hope appengine magic continues to evolve as it fills a big gap and is very helpful. In any case, we just started using the FileService api to read and write files to the blobstore, as referenced here:

https://developers.google.com/appengine/docs/java/blobstore/overview#Writing_Files_to_the_Blobstore

It works perfectly in production, but does not appear to be compatible with appengine magic. For example, .createNewBlobFile works fine, but .openWriteChannel throws the following exception:

java.lang.NullPointerException 
at com.google.appengine.tools.development.RequestEndListenerHelper.register(RequestEndListenerHelper.java:39)
at com.google.appengine.api.files.dev.LocalFileService.open(LocalFileService.java:247)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

running version 0.5.0.

colemc avatar Apr 27 '13 16:04 colemc

Yes, it's on the task list for the next version. Patches welcome. :)

gcv avatar Apr 27 '13 16:04 gcv

Great to hear, really glad the next version is alive and well. If you'd like to point me in the right direction or outline how you'd like to have it implemented i'll see what we can do about a patch in the meantime. Any ballpark for the next version?

colemc avatar Apr 27 '13 18:04 colemc

Start by implementing a wrapper for the App Engine FileService, using any existing service wrapper as a guide for what it needs to do. Then look in appengine_magic/services/blobstore.clj for where you'd write the appropriate entry point. A complete patch needs to work with production and the interactive REPL mode.

I guess a patch on top of 0.5.0 would be fine, since recent App Engine changes have made the master branch fall pretty far behind. Though I'd really like to get all those problems fixed, too. I've been pretty busy with consulting projects lately, so no real ETA for the next version.

gcv avatar Apr 27 '13 18:04 gcv