Struts provided a best way of getting the stream u can use that rather than writing ur own piece of code . There is one DataType called FormFile in struts which maps to <input typ="file"> in to ur form bean
and in ur action class just say getXXXXXXXXX() which returns u FormFile and execute getStream which return u stream
Well this is what I came up with using a byte array instead of just the int:
And it really seems to have increased the upload speeds alot over the previous:
I guess none of this is really particular to Struts though, but maybe this can help someone else who's experiencing the same problems with the uploads in struts that I'm having.
Still doesn't fix the problem of *really* large uploads(200 megs or greater) dropping out and being replaced with the smaller previously uploaded file (just truly odd).
I just want to repeat its *much* faster (by an order of 100 or so). I'm just confused why I haven't seen it mentioned/posted anywhere that this wouldbe the correct way to do it... and that the other way is painstakingly slow.
-Tad [ April 15, 2005: Message edited by: Tad Dicks ]
Doe, a deer, a female deer. Ray, a pockeful of sun. Me, a name, I call my tiny ad ...