Uploading a file to GAE with Play! Framework

450 views Asked by At

What is the best way of uploading files to Google App Engine Blobstore with Play! Framework, using Siena and GAE module?

I have tried declaring a Blob field in my Model:

public Blob image;

And a method to attach the file:

public void attachImage(byte[] bytes) {
    this.image = new Blob(bytes);
}

I don't really know how to test this since the CrudSiena module doesn't display an upload field. Any help much appreciated.

1

There are 1 answers

4
mandubian On

Blob is a type managed by GAE datastore but it's different from GAE Blobstore!

If you use byte[] instead of Blob in your model, does it work with CrudSiena?