From 09dc946022c1e9a993f52a10a32126420b722142 Mon Sep 17 00:00:00 2001
From: Damien <damien.burel@maarch.org>
Date: Tue, 24 Mar 2020 11:38:20 +0100
Subject: [PATCH] FEAT #11902 TIME 0:15 Fix format

---
 src/app/action/controllers/ActionMethodController.php | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/app/action/controllers/ActionMethodController.php b/src/app/action/controllers/ActionMethodController.php
index 810287aa4a8..2eb3e1d87ef 100644
--- a/src/app/action/controllers/ActionMethodController.php
+++ b/src/app/action/controllers/ActionMethodController.php
@@ -915,7 +915,7 @@ class ActionMethodController
                 'collId'            => 'letterbox_coll',
                 'docserverTypeId'   => 'DOC',
                 'encodedResource'   => base64_encode(file_get_contents($pathToDocument)),
-                'format'            => 'pdf'
+                'format'            => $resource['format']
             ]);
             if (!empty($storeResult['errors'])) {
                 return ['errors' => ["[storeResourceOnDocServer] {$storeResult['errors']}"]];
@@ -939,7 +939,8 @@ class ActionMethodController
                 'encodedFile'   => base64_encode(file_get_contents($pathToDocument)),
                 'type'          => 'response_project',
                 'resIdMaster'   => $args['data']['resId'],
-                'title'         => $resource['subject']
+                'title'         => $resource['subject'],
+                'format'        => $resource['format']
             ]);
             if (empty($id) || !empty($id['errors'])) {
                 return ['errors' => ['[storeAttachment] ' . $id['errors']]];
@@ -954,7 +955,8 @@ class ActionMethodController
                 'type'          => 'signed_response',
                 'resIdMaster'   => $args['data']['resId'],
                 'title'         => $resource['subject'],
-                'originId'      => $id
+                'originId'      => $id,
+                'format'        => $resource['format']
             ]);
             if (empty($id) || !empty($id['errors'])) {
                 return ['errors' => ['[storeAttachment] ' . $id['errors']]];
-- 
GitLab