At 8:02 AM +0300 5/16/04, ayouaa0a wrote:
I'm using struts 1.1
Maybe, I must change the default uploader class or something, can u send me
the application configuration for the application u mentioned, and also the
snap of code getting the file.

The code dealing with the file is all in the Struts or commons-fileupload source distributions. You can browse the source code via viewcvs, download a JAR of it from the Apache distributions site, or check it out from CVS.


http://jakarta.apache.org/struts/acquiring.html
http://cvs.apache.org/viewcvs.cgi/jakarta-struts/
http://jakarta.apache.org/commons/fileupload/
http://cvs.apache.org/viewcvs.cgi/jakarta-commons/fileupload/

My config file won't help you much -- as you've specified it in your email you are setting the property correctly.

As compared to some Struts classes like Actions and Forms, it's pretty unlikely that you'll ever need to change the multipartClass property of the controller; Struts only comes with one implementation, and it would be non-trivial to write another one. It is true that it's within that class (the default is org.apache.struts.upload.CommonsMultipartRequestHandler) where your errors are ultimately occurring.

One of the struts-example apps uses the file-upload stuff; it might give you another way to test your configuration and deployment enviroment.

Joe


-----Original Message-----
From: Joe Germuska [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 16, 2004 2:45 AM
To: Struts Users Mailing List
Subject: Re: memFileSize to control the file in memory or on disk

It looks as though you have the syntax correct for setting the
"memFileSize" property.  What is happening now that you have set it?
Are you still getting the "access denied" errors as if Struts is
trying to write the file to disk?  Or is something else happening?

What version of Struts are you using?  I don't know off hand of any
bugs with this, and I've seen it work correctly in a recent webapp
build on Struts 1.2.x code.  That's not to say that you have to use
Struts 1.2 to use the fileupload; that's just where I've seen the
value of the property honored.

Maybe you should turn up logging to see messages from the
org.apache.struts.upload package?

Joe


At 5:09 PM +0300 5/15/04, Ayoub, Ashraf A wrote:
Dears,

I'm depending on struts in my application, and I have an option for
uploading files in my application.

The problem is:

I want to upload the files and instantly save it to DB ==> so I'm
getting the byte[] and write it to the DB, as I don't have permission to
write files to disk before uploading and keep getting Access denied when
uploading. I searched for a while and found that I can customize struts
behaviour using memFileSize property, so I'm providing the configuration
file of struts-config.xml as it also didn't work for me when uploading
any file



   <controller bufferSize="262144">

     <set-property property="memFileSize" value="10M" />

   </controller>





What is the solution of this problem?



Thanks


--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Imagine if every Thursday your shoes exploded if you tied them
the usual way. This happens to us all the time with computers, and
nobody thinks of complaining."
-- Jef Raskin


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining."
-- Jef Raskin


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to