[Stripes-users] File access in the FileBean

2014-03-01 Thread Heather and Jon Turgeon
Hello all, I am trying to use Stripes in an app that will be hosted on Amazon's AWS. I want to allow file upload and am running into a bit of a problem. Amazon wants me to store the file on S3 passing a byte array. It seems easy enough to do this if I were to have access to the File object in

Re: [Stripes-users] File access in the FileBean

2014-03-01 Thread Adam Stokar
If you are using the AWS Java SDK, you can upload a file to s3 by sending an InputStream (see the PutObjectRequest). the FileBean object has a getInputStream() method which would avoid the need to save it locally before sending to S3. On Sat, Mar 1, 2014 at 3:23 PM, Heather and Jon Turgeon

Re: [Stripes-users] File access in the FileBean

2014-03-01 Thread Rusty Wright
If you need a MultipartWrapper here's one by Moritz Petersen I got off the net a few years ago for Google App Engine (GAE). With GAE you can't write to the local filesystem, writes are restricted to the database. Adjust the code as necessary. http://pastebin.com/GMejKAQz On Sat, Mar 1, 2014

Re: [Stripes-users] File access in the FileBean

2014-03-01 Thread Rusty Wright
Sorry, I pasted the wrong one. Refresh that pastebin page if you grabbed it before now. On Sat, Mar 1, 2014 at 1:17 PM, Rusty Wright rusty.wri...@gmail.com wrote: If you need a MultipartWrapper here's one by Moritz Petersen I got off the net a few years ago for Google App Engine (GAE). With

Re: [Stripes-users] File access in the FileBean

2014-03-01 Thread Reuven Gaisin
You can create a byte array from the InputStream. Get an InputStream from the FileBean and pass that into IOUtils.toByteArray(). IOUtils class is part of the Apache Commons IO library: JavaDoc for IOUtils method:

[Stripes-users] stripes-guice and guice-persist?

2014-03-01 Thread Rusty Wright
Is anyone using these together? I'm not having any luck. Or, alternatively, what are you using with stripes-guice to inject your JPA entity manager? -- Flow-based real-time traffic analytics software. Cisco certified