IDEMPIERE-5310 Email can't work in Archive Viewer for User/Contact #resolve (#1359)
This commit is contained in:
parent
eb0366dba8
commit
0531cce28c
|
@ -72,6 +72,7 @@ import org.compiere.model.MLookup;
|
|||
import org.compiere.model.MLookupFactory;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.model.MUser;
|
||||
import org.compiere.tools.FileUtil;
|
||||
import org.compiere.util.DisplayType;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
@ -693,9 +694,7 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
|
|||
MArchive ar = m_archives[m_index];
|
||||
|
||||
MUser from = MUser.get(Env.getCtx(), Env.getAD_User_ID(Env.getCtx()));
|
||||
String fileName = System.getProperty("java.io.tmpdir") +
|
||||
System.getProperty("file.separator") + ar.getName() + ".pdf";
|
||||
File attachment = new File(fileName);
|
||||
File attachment = new File(FileUtil.getTempMailName(ar.getName(), ".pdf"));
|
||||
try {
|
||||
Files.write(attachment.toPath(), ar.getBinaryData());
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Reference in New Issue