-3

I have followed the official documentation https://symfony.com/doc/current/controller/upload_file.html

the upload of the file work good, but the probleme is at the first when i select file to uplad it i a can't show it in input

I show it only when i put the mouse over the input

enter image description here

how to solve this probleme?

Khalil
  • 33
  • 7

1 Answers1

-1

Question solved,

I have added this script

<script>
// Add the following code if you want the name of the file appear on select
$(".custom-file-input").on("change", function() {
  var fileName = $(this).val().split("\\").pop();
  $(this).siblings(".custom-file-label").addClass("selected").html(fileName);
});
</script>
Khalil
  • 33
  • 7