Thank you very much Gertjan. Your solution is much
simpler than what I was planning to do, and so I will
use it instead of mine!
--- Gertjan Assies <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I use the following simple code to move uploaded
> files
> It's called from the action which handles the
> submitted form
> the _sName here is extracted from the submitted
> field value which
> contains the local path and the filename
>
> private boolean moveFile(String _sName) {
> boolean bResult = false;
> File aInFile = new File(TEMP_PATH + _sName);
> if (aInFile.exists()) {
> File aOutFile = new File(DEST_PATH +
> _sName);
> bResult = aInFile.renameTo(aOutFile);
> }
> return bResult;
> }
>
> Leszek Gawron wrote:
>
> > Paul Joseph wrote:
> >
> >> Thank you Grzegorz.
> >>
> >> I would like to save it under the Tomcat
> >> hierarchy....so that Tomcat can serve the
> uploaded
> >> file to other users in the company.
> >>
> >> That being the case, the other option that you
> suggest
> >> is to disable autoupload.
> >>
> >> If I do this, will the upload widget continue to
> work?
> >> (that is all I care about in terms of uploading)
> >
> > First I think there is no such thing as
> autoupload. However if the
> > upload is being enabled in web.xml file then if
> multipart request
> > comes the request is automatically properly
> decoded and made available
> > to the user. Query cocoon wiki for the way to
> obtain the access to
> > FilePart. You should copy the data into some
> storage (filesystem,
> > database). I do not really remember the details of
> this mechanism. If
> > it persists temporary data to disk it will be
> deleted after the
> > request has been processed.
> >
>
>
>
---------------------------------------------------------------------
> 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]