@edmondw dans les faits, tu peux définir le paramètre authorized-extensions
pour définir les upload
autorisés.
Normalement il faut le définir dans le fichier wakka.config.php
en te basant sur le contenu de attach/config.yaml
Mais comme les deux fichiers ne sont pas dans le même format, tu pourrais aussi créer un fichier custom/config.yaml
où tu y mets en retirant les lignes en trop
parameters:
authorized-extensions:
# Images reconnues par PHP
jpg: 'JPEG'
png: 'PNG'
gif: 'GIF'
jpeg: 'JPEG'
webp: 'WEBP'
# Autres images (peuvent utiliser le tag <img>)
avif: 'AVIF'
bmp: 'BMP'
tif: 'TIFF'
svg: 'SVG'
# Audio / Video
aiff: 'AIFF'
anx: 'Annodex'
axa: 'Annodex Audio'
axv: 'Annodex Video'
asf: 'Windows Media'
avi: 'AVI'
flac: 'Free Lossless Audio Codec'
flv: 'Flash Video'
mid: 'Midi'
mng: 'MNG'
mka: 'Matroska Audio'
mkv: 'Matroska Video'
mov: 'QuickTime'
mp3: 'MP3'
mp4: 'MPEG4'
mpg: 'MPEG'
oga: 'Ogg Audio'
ogg: 'Ogg Vorbis'
ogv: 'Ogg Video'
ogx: 'Ogg Multiplex'
qt: 'QuickTime'
ra: 'RealAudio'
ram: 'RealAudio'
rm: 'RealAudio'
spx: 'Ogg Speex'
swf: 'Flash'
wav: 'WAV'
wmv: 'Windows Media'
3gp: '3rd Generation Partnership Project'
# Documents
abw: 'Abiword'
ai: 'Adobe Illustrator'
bz2: 'BZip'
bin: 'Binary Data'
blend: 'Blender'
c: 'C source'
cls: 'LaTeX Class'
css: 'Cascading Style Sheet'
csv: 'Comma Separated Values'
deb: 'Debian'
doc: 'Word'
docx: 'Word'
djvu: 'DjVu'
dvi: 'LaTeX DVI'
eps: 'PostScript'
gz: 'GZ'
h: 'C header'
kml: 'Keyhole Markup Language'
kmz: 'Google Earth Placemark File'
md: 'Markdown'
mm: 'Mindmap'
pas: 'Pascal'
pdf: 'PDF'
pgn: 'Portable Game Notation'
ppt: 'PowerPoint'
pptx: 'PowerPoint'
ps: 'PostScript'
psd: 'Photoshop'
pub: 'Microsoft Publisher'
rpm: 'RedHat/Mandrake/SuSE'
rtf: 'RTF'
sdd: 'StarOffice'
sdw: 'StarOffice'
sit: 'Stuffit'
sty: 'LaTeX Style Sheet'
sxc: 'OpenOffice.org Calc'
sxi: 'OpenOffice.org Impress'
sxw: 'OpenOffice.org'
tex: 'LaTeX'
tgz: 'TGZ'
torrent: 'BitTorrent'
ttf: 'TTF Font'
txt: 'texte'
xcf: 'GIMP multi-layer'
xspf: 'XSPF'
xls: 'Excel'
xlsx: 'Excel'
xlsm: 'Excel'
xml: 'XML'
yaml: 'YAML'
zip: 'Zip'
scar: 'SCAR'
# Open Document
odt: 'opendocument text'
ods: 'opendocument spreadsheet'
odp: 'opendocument presentation'
odg: 'opendocument graphics'
odc: 'opendocument chart'
odf: 'opendocument formula'
odb: 'opendocument database'
odi: 'opendocument image'
odm: 'opendocument text-master'
ott: 'opendocument text-template'
ots: 'opendocument spreadsheet-template'
otp: 'opendocument presentation-template'
otg: 'opendocument graphics-template'
A tester, car je ne suis pas sûr à 100% que ça filtre bien même si normalement, j’avais fait en sorte lors d’un refactor que la définition des extensions autorisées ne soit faite qu’à cet endroit.