-----Original Message-----
From: Martin Cooper
> try {
> item.write(uploadedFile);
> } catch (java.lang.Exception err) {
> retval= sd.fileWriteError;//failed upload
> logger.error(userName+
> "Error on writing file to the
archive. " + err);
> }//end catch
> }
I guess I'm not understanding what you mean by "intercept
the filename". You have *complete* control over the file
name if you're writing the file to disk. You can name the
file whatever you want and put it wherever you want. In the
code above, there is only one line
(item.write()) that has anything to do with FileUpload -
the rest is your file name manipulation code. Isn't that
where you'd "intercept"
it and change the name to whatever you want? I'm not
getting it, sorry...
As I see it Martin, I need to leave the source filename unchanged
simply to get hold of the file, and as you say, its in one line,
the item.write, hence I don't see how I can read from 'file with spaces.xml'
to file_with_spaces.xml (or some other translation).
I'm frantically trying to avoid writing to a tmp file
then moving the file to its final location with a rename, since this will
be troublesome with a very large file.
regards DaveP
** snip here **
--
DISCLAIMER:
NOTICE: The information contained in this email and any attachments is
confidential and may be privileged. If you are not the intended
recipient you should not use, disclose, distribute or copy any of the
content of it or of any attachment; you are requested to notify the
sender immediately of your receipt of the email and then to delete it
and any attachments from your system.
RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants. However, it
cannot accept any responsibility for any such which are transmitted.
We therefore recommend you scan all attachments.
Please note that the statements and views expressed in this email and
any attachments are those of the author and do not necessarily represent
those of RNIB.
RNIB Registered Charity Number: 226227
Website: http://www.rnib.org.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]