From 70fcc760238fdcfaafd0b766d89a61305ffddf15 Mon Sep 17 00:00:00 2001 From: Kraev Alexander Date: Thu, 24 Sep 2015 14:01:09 +0300 Subject: [PATCH] if uploaded file located not in current directory it has sloppy name with path in JIRA: "/var/www/path/file.txt" instead of "file.txt" --- src/Jira/Api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Jira/Api.php b/src/Jira/Api.php index 2c642a5..9292ba4 100644 --- a/src/Jira/Api.php +++ b/src/Jira/Api.php @@ -433,7 +433,7 @@ public function createAttachment($issue, $filename, $options = array()) { $options = array_merge( array( - "file" => '@' . $filename, + "file" => '@' . $filename . ';filename=' . pathinfo($filename, PATHINFO_BASENAME), ), $options );