if (sFileProtocol.equalsIgnoreCase("ftp://"))
oLoca.upload(oConn, oFileSys, "file://" + sDirPath, sFileName, "ftp://" + sFileServer + sWrkAHome + sCatPath, sFileName);
else
oLoca.upload(oConn, oFileSys, "file://" + sDirPath, sFileName, sFileProtocol + sWrkAHome + sCatPath, sFileName);
ActivityAttachment oAttach = new ActivityAttachment();
oAttach.put(DB.gu_activity, getString(DB.gu_activity));
oAttach.put(DB.gu_product, oProd.getString(DB.gu_product));
oAttach.put(DB.gu_location, oLoca.getString(DB.gu_location));
oAttach.put(DB.gu_writer, sGuWriter);
oAttach.store(oConn);
if (bDeleteOriginalFile) {
if (DebugFile.trace) DebugFile.writeln("deleting file "+oFile.getAbsolutePath());
oFile.delete();
if (DebugFile.trace) DebugFile.writeln("deleting file "+sFileName+" deleted");
}
if (DebugFile.trace) {
DebugFile.decIdent();
DebugFile.writeln("End Activity.addAttachment() : " + String.valueOf(oAttach.getInt(DB.pg_product)));
}
return oAttach;
} // addAttachment