Topic: File input not working

Reijin free asked 4 years ago


Hello, I use MDB Pro and the file input not working anybody can help me ? My code:

  <form method="POST" action="profil.php" enctype="multipart/form-data">
                <div class="modal-body">
                    <div class="mb-4 d-flex justify-content-center">
                        <img src="img/users/<?=$_SESSION['img']?>" class="rounded-circle z-depth-1-half avatar-pic" alt="">
                    </div>
                    <div class="file-field">
                        <div class="btn btn-outline-success btn-sm float-left">
                            <span>Choose files</span>
                            <input type="file" multiple>
                        </div>
                        <div class="file-path-wrapper">
                            <input class="file-path validate" type="text" placeholder="Upload one or more files">
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-outline-danger btn-sm" data-dismiss="modal">Fermer</button>
                    <button type="submit" class="btn btn-outline-success btn-sm" name="edit_img">Envoyer</button>
                </div>
           </form>

My bug

This is what I have on my screen.


Grzegorz Bujański staff commented 4 years ago

Hi. Can you tell me something more? What exactly doesn't work? Are there any errors in the console?


Reijin free answered 4 years ago


I found my problem, I wrote

<input type="file" multiple>

To solve I just delete multiple

<input type="file">

enter image description here



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.17.0
  • Device: Computer
  • Browser: Opera GX
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No