Hi Yes, it is configurable. It all depends on the CXF AttachmentDeserializer which does all the advanced manipulation of attachments. You can add jaxrs:properties to your jaxrs:endpoint :
<jaxrs:endpoint> <jaxrs:serviceBeans/> <jaxrs:properties> <entry key="attachment-directory" value="some folder"></entry> <!-- memory threshold, in bytes, default is 100K --> <entry key="attachment-memory-threshold" value="100000"></entry> </jaxrs:properties> </jaxrs:endpoint> So you can specify diff folders for different endpoints You can also do it from the code (probably won't suit you if you use MultipartBody in your method signature), but this depends on a MessageContext being injected, in which case one can do AttachmentUtils.getMultipartBody(messageContext, "someDir", 10000); Give it a try and let me know please if it all works as expected. I apologize for not documenting it properly - I'll give it my best shot :-) once 2.2.3 has been released Sergey Mustafa Sezgin-2 wrote: > > Hi all, > > > > Just a quick question about handling multi part msgs. We are writing a > number of Rest services using CXF + Spring. Some of these services will > need to accept files, some of which are quite large. We deal with lots of > data from lots of users. > > I am wondering what the best way to do this is. Currently, as an argument > to the service method, we specify a MultipartBody object, thus we will be > requesting users of our services send these files in multi part msgs where > each file is a single part within the multi part msg. However I have my > doubts about this. How does CXF handle large files? Say if someone sends > 3x2GB files? From what I can see, the service does not actually get passed > the multi part msg until the msg has been received in full. Thus the data > received (in total 6GB) will need to be stored somewhere, before being > passed to the service. Will this be written to disk, and if so, is this > configurable in anyway? I am presuming CXF doesn't store all this data in > memory, as this would seem like the wrong way to do this... > > > > If there are 'better' ways to do this with CXF, I would love to hear > them.. > > > > Thanks in advance for the responses.. > > > > Mustafa > > > > > -- View this message in context: http://www.nabble.com/Best-way-to-handle-large-multi-part-msgs-tp24490493p24493331.html Sent from the cxf-user mailing list archive at Nabble.com.
