Anomalie #14075
Administration : message d'erreur à l'importation d'un modèle docx (mime type)
Description
Étape :
- Créer un nouveau modèle de document
- Importer un document docx
- Cliquer sur valider
Comportement constaté :
- Le document se charge bien
- Message d’erreur lors de l’enregistrement.
Comportement attendu :
- Le docx est importer : docx étant le format natif de onlyoffice, il faut qu’il puisse être utilisé.
Le bug est constaté sur l’intégration et la préprod.
History
#2 Updated by Henri QUENEAU over 3 years ago
Impossible d'injecter des modèles de documents dans l'administration des modèles:
Résolution:
modification de la page
/var/www/html/MaarchCourrier/src/app/template/controllers/TemplateControllers.php
en remplaçant:
const AUTHORIZED_MIMETYPES = [ 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-excel', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'application/vnd.oasis.opendocument.text', 'application/vnd.oasis.opendocument.presentation', 'application/vnd.oasis.opendocument.spreadsheet' ];
par
const AUTHORIZED_MIMETYPES = [ 'application/zip', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-excel', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'application/vnd.oasis.opendocument.text', 'application/vnd.oasis.opendocument.presentation', 'application/vnd.oasis.opendocument.spreadsheet' ];
#3 Updated by Support Maarch over 3 years ago
- Status changed from A qualifier to A traiter
#4 Updated by Emmanuel DILLARD over 3 years ago
- Subject changed from Impossible d’importer des modèle au format docx to Administration : message d'erreur à l'importation d'un modèle docx
- Status changed from A traiter to R&D - A étudier
- Priority changed from 0-Bloquant to 1-Majeur
Reproduit avec le doc transmis (message Mime Type)
Message :
http://demo.maarchcourrier.com/rest/templates
Ce type de fichier n'est pas permis : application/zip
Mime type du document en erreur :
File Type: Microsoft Office Document (Word)
MIME Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
Suggested file extension(s): docx
Non reproduit avec fichier DOCX créé.
Mime type du doc de test
File Type: Microsoft Office Document (Word)
MIME Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
Suggested file extension(s): docx
Contournement :
Editer avant de valider (valider l'édition par OnlyOffice, puis enregistrer)
#5 Updated by Emmanuel DILLARD over 3 years ago
- Subject changed from Administration : message d'erreur à l'importation d'un modèle docx to Administration : message d'erreur à l'importation d'un modèle docx (mime type)
- Status changed from R&D - A étudier to Etude planifiée
- Assignee changed from Robin SALDINGER to EDI PO
#6 Updated by Emmanuel DILLARD over 3 years ago
#7 Updated by Emmanuel DILLARD over 3 years ago
- Status changed from Etude planifiée to R&D - A planifier
#8 Updated by Emmanuel DILLARD over 3 years ago
- Project changed from Backlog to CURRENT SPRINT
- Status changed from R&D - A planifier to R&D - En cours
- Target version changed from Inscription Backlog Courrier to 20.10 Develop
- Tags Courrier 20.03.5 added
Voir MAJ de la fonction Mime Type (librairie)
#10 Updated by Florian AZIZIAN over 3 years ago
- Assignee deleted (
EDI PO)
#11 Updated by Florian AZIZIAN over 3 years ago
- Assignee set to Florian AZIZIAN
#12 Updated by Florian AZIZIAN over 3 years ago
Corrigé.
Reproduit avec les fichiers issus de MS Office 2007 :
https://www.php.net/manual/fr/function.finfo-file.php#107750
#13 Updated by Florian AZIZIAN over 3 years ago
- Status changed from R&D - En cours to R&D - Terminé
#14 Updated by Emmanuel DILLARD over 3 years ago
- Tags Courrier 20.03.5 (released) added
- Tags Courrier deleted (
20.03.5)
#15 Updated by Emmanuel DILLARD over 3 years ago
- Project changed from CURRENT SPRINT to Backlog
#16 Updated by Emmanuel DILLARD over 2 years ago
- Project changed from Backlog to Backlog Courrier
- Target version changed from 20.10 Develop to 20.10