We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e05ef2e commit e12778fCopy full SHA for e12778f
1 file changed
src/main/java/fr/istic/service/TemplateService.java
@@ -59,7 +59,12 @@ public TemplateDTO persistOrUpdate(TemplateDTOContent templateDTO) {
59
template = Template.persistOrUpdate(template);
60
61
try {
62
- fichierS3Service.putObject("template/" + template.id + ".pdf", bytes, templateDTO.contentContentType);
+ if ("application/zip".equals(templateDTO.contentContentType)){
63
+ fichierS3Service.putObject("template/" + template.id + ".zip", bytes, templateDTO.contentContentType);
64
+
65
+ }else {
66
+ fichierS3Service.putObject("template/" + template.id + ".pdf", bytes, templateDTO.contentContentType);
67
+ }
68
} catch (InvalidKeyException | NoSuchAlgorithmException | IllegalArgumentException | IOException e) {
69
e.printStackTrace();
70
}
0 commit comments