diff --git a/jira_connector.py b/jira_connector.py index a16156c..2799100 100644 --- a/jira_connector.py +++ b/jira_connector.py @@ -31,6 +31,7 @@ from bs4 import BeautifulSoup, UnicodeDammit from dateutil.parser import parse from phantom.vault import Vault +from phantom_common import paths from jira.client import JIRA # THIS Connector imports @@ -1679,7 +1680,8 @@ def _handle_attachment(self, attachment, container_id, artifact_list, action_res if hasattr(Vault, 'get_vault_tmp_dir'): tmp = tempfile.NamedTemporaryFile(dir=Vault.get_vault_tmp_dir(), delete=False) else: - tmp = tempfile.NamedTemporaryFile(dir='/opt/phantom/vault/tmp/', delete=False) + local_dir = os.path.join(paths.PHANTOM_VAULT, "tmp") + tmp = tempfile.NamedTemporaryFile(dir=local_dir, delete=False) ret_val = self._download_file(attachment.content, tmp.name)