[play 1.2.4][gae 1.6.0][crudsiena 2.0.3] How to save Blob in GAE with CrudSiena

34 views
Skip to first unread message

Oleksandr Bezhan

unread,
May 1, 2012, 4:14:43 AM5/1/12
to play-framework
Hi guys. How to save images to GAE BlobStore with CrudSiena ? What
type should I use ?
The only type which CrudSiena renders as field in admin panel CRUD
form is byte[] but AFAIK GAE required GAE Blob type to be saved in
BlobStore.
How to make CrudSiena render CRUD field for type GAE Blob ?

Pascal Voitot Dev

unread,
May 1, 2012, 5:17:44 AM5/1/12
to play-fr...@googlegroups.com
normally, siena knows how to serialize a byte[] into a GAE Blob.
The problem is on play-siena/play-crud-siena side.
I made crudsiena represent a byte[] as a file so that you could use image files.
But apparently something fails while saving the data.

I don't have time right now to investigate this problem. Did you succeed to find the exact place where the data is lost?

Thanks
Pascal


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.


Oleksandr Bezhan

unread,
May 1, 2012, 10:05:26 AM5/1/12
to play-framework
I found that byte[] param is lost while binding params(SienaPlugin
doesn't bind it correctly, but creates an empty byte[] array).
I suppose we need to create own binder.

Pascal Voitot Dev

unread,
May 1, 2012, 5:33:22 PM5/1/12
to play-fr...@googlegroups.com
is it siena plugin or is it play default binding mechanism?
(just to know if it's an error in sienaplugin)

Pascal

Oleksandr Bezhan

unread,
May 2, 2012, 12:55:04 AM5/2/12
to play-framework
I cannot say exactly where is the error cause I don't know how all
these things should work.
I see that Play creates empty bean and SienaPlugin don't put byte[]
param in it in method bind().
Reply all
Reply to author
Forward
0 new messages