Skip to content
Snippets Groups Projects
Unverified Commit 6fc856a7 authored by Zerouali's avatar Zerouali Committed by GitHub
Browse files

fixe download bdx issue (#527)

parent 73f441cd
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,7 @@ import org.odftoolkit.simple.table.Cell;
import org.odftoolkit.simple.table.Row;
import org.odftoolkit.simple.table.Table;
import org.odftoolkit.simple.text.Paragraph;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.util.FileCopyUtils;
import org.w3c.dom.Document;
......@@ -93,6 +94,8 @@ public class IngestGeneratorODTFile {
public static final String FIRST_TITLE = "Bordereau de versement d'archives";
public static final String SECOND_TITLE = "Détail des unités archivistiques de type répertoire et dossiers:";
@Value("${tmp_folder_path}")
private String tmpFolderPath;
public void generateDocumentHeader(TextDocument document, CustomerDto myCustomer,
Resource customerLogo) throws IOException, URISyntaxException {
......@@ -129,10 +132,11 @@ public class IngestGeneratorODTFile {
.getDecoder()
.decode(customerLogoBase64Image);
imgFile = "src/main/resources/logo_ministere." + getExtensionByCustomerLogo(customerLogoBase64Image).toLowerCase();
imgFile = tmpFolderPath + "/logo_ministere." + getExtensionByCustomerLogo(customerLogoBase64Image).toLowerCase();
FileUtils.writeByteArrayToFile(new File(imgFile), customerLogoDecodedBytes);
headerTable.getCellByPosition(1,0).setImage(new URI(imgFile));
FileUtils.forceDelete(new File(imgFile));
}
......
......@@ -50,6 +50,8 @@ opentracing:
host: localhost
port: 6831
tmp_folder_path: "src/main/resources"
logging:
level:
fr.gouv.vitamui.ingest: DEBUG
......
......@@ -27,4 +27,6 @@ server-identity:
identityServerId: 1
tmp_folder_path: "src/main/resources"
logbook.scheduling.sendEventToVitamTasks.enabled: false
......@@ -331,6 +331,7 @@ vitamui:
secure: true
jvm_log: false
logging_level: "INFO"
tmp_folder_path : "{{ vitamui_defaults.folder.root_path }}/tmp"
log:
logback_max_file_size: "10MB"
logback_max_history: 30
......
......@@ -67,6 +67,7 @@ opentracing:
host: {{ opentracing.jaeger.udp_sender.host }}
port: {{ opentracing.jaeger.udp_sender.port }}
tmp_folder_path : {{ vitamui_struct.tmp_folder_path }}/{{ vitamui_struct.vitamui_component }}
logging:
config: {{ vitamui_folder_conf }}/logback.xml
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment