DSFR v1.12.0
Ce composant permet aux utilisateurs de sélectionner et envoyer un ou plusieurs fichiers.
Documentation<div class="fr-upload-group" id="upload-group-1167">
<label class="fr-label" for="file-upload">
Ajouter un fichier
<span class="fr-hint-text">Indication : taille maximale : 500 Mo. Formats supportés : jpg, png, pdf. Plusieurs fichiers possibles. Lorem ipsum dolor sit amet, consectetur adipiscing.</span>
</label>
<input class="fr-upload" aria-describedby="file-upload-messages" type="file" id="file-upload" name="file-upload">
<div class="fr-messages-group" id="file-upload-messages" aria-live="polite">
</div>
</div>
<div class="fr-upload-group fr-upload-group--error" id="upload-group-1170">
<label class="fr-label" for="file-upload-with-error">
Ajouter un fichier
<span class="fr-hint-text">Indication : taille maximale : 500 Mo. Formats supportés : jpg, png, pdf. Plusieurs fichiers possibles. Lorem ipsum dolor sit amet, consectetur adipiscing.</span>
</label>
<input class="fr-upload" aria-describedby="file-upload-with-error-messages" type="file" id="file-upload-with-error" name="file-upload-with-error">
<div class="fr-messages-group" id="file-upload-with-error-messages" aria-live="polite">
<p class="fr-message fr-message--error" id="file-upload-with-error-message-error">Format de fichier non supporté</p>
</div>
</div>
<div class="fr-upload-group" id="upload-group-1173">
<label class="fr-label" for="file-upload-multiple">
Ajouter des fichiers
<span class="fr-hint-text">Indication : taille maximale : 500 Mo. Formats supportés : jpg, png, pdf. Plusieurs fichiers possibles. Lorem ipsum dolor sit amet, consectetur adipiscing.</span>
</label>
<input class="fr-upload" aria-describedby="file-upload-multiple-messages" multiple type="file" id="file-upload-multiple" name="file-upload-multiple">
<div class="fr-messages-group" id="file-upload-multiple-messages" aria-live="polite">
</div>
</div>
<div class="fr-upload-group fr-upload-group--disabled" id="upload-group-1176">
<label class="fr-label" for="file-upload-disabled">
Ajouter un fichier
<span class="fr-hint-text">Indication : taille maximale : 500 Mo. Formats supportés : jpg, png, pdf. Plusieurs fichiers possibles. Lorem ipsum dolor sit amet, consectetur adipiscing.</span>
</label>
<input class="fr-upload" disabled aria-describedby="file-upload-disabled-messages" type="file" id="file-upload-disabled" name="file-upload-disabled">
<div class="fr-messages-group" id="file-upload-disabled-messages" aria-live="polite">
</div>
</div>