----- Original Message -----
From: "James M Snell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 30, 2003 14:21
Subject: Re: Axis attachment naming enhancement (code attached)
> +1. some kind of metadata is needed.
>> Perhaps the real solution is to make Axis store the filename somewhere.
>> (perhaps in a file like Axis98765axis.properties)? I agree that letting
>> the client control the server filename is a security risks, but carrying
>> meta-data, such as whether or not the file is a .exe file) is useful.
well, if the sender sets the filename as a a mime header, the header
magically becomes a piece of metadata at the far end -a header element.
So if we add a method in AttachmentPart to add the filename as a header
(yes, something you call by hand), we could provide the code to get the
filename something lke
string filename=null;
if(datasource instanceof ManagedMemoryDataSource) {
... filename=getDiskCacheFilename();
} else {
filename=datasource.getName();
}
if(filename!=null) {
filename= (extract filename and extension from path)
addHeader(X_ORIGINAL_FILENAME,filename);
}
so only add the header if we have a filename (no forced save to disk), and
only do the work if the user explicitly requests it.