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:
http://commons.apache.org/proper/commons-io/javadocs/api-release/org/apache/commons/io/IOUtils.html#toByteArray%28java.io.InputStream%29
Also, remember to call delete() on the FileBean when you are done since you
are streaming (see
http://www.stripesframework.org/display/stripes/File+Uploads#FileUploads-ReadingtheuploadedfileasaStream).
Reuven
On Sat, Mar 1, 2014 at 4:22 PM, Rusty Wright <rusty.wri...@gmail.com> wrote:
> 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 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 at 12:23 PM, Heather and Jon Turgeon <
>> tashiba40_evergr...@hotmail.com> wrote:
>>
>>> 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
>>> the FileBean, but it is private. So, any thoughts as the the easiest way to
>>> gain access to it while in the temp directory? I am trying to minimize the
>>> changes I would need to make to the framework. Thanks
>>>
>>> Jon
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Flow-based real-time traffic analytics software. Cisco certified tool.
>>> Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
>>> Customize your own dashboards, set traffic alerts and generate reports.
>>> Network behavioral analysis & security monitoring. All-in-one tool.
>>>
>>> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Stripes-users mailing list
>>> Stripes-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>>
>>>
>>
>
>
> ------------------------------------------------------------------------------
> Flow-based real-time traffic analytics software. Cisco certified tool.
> Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
> Customize your own dashboards, set traffic alerts and generate reports.
> Network behavioral analysis & security monitoring. All-in-one tool.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users