twitter bootstrap - Not able to upload file when using boostrap -


i new bootstrap framework. created small web page upload files. submit button working fine, file not getting uploaded.

<html>  <head>  <!-- latest compiled , minified css -->  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">    <!-- optional theme -->  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>  <!-- latest compiled , minified javascript -->  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>  </head>  <body>  <div class="container">      <div class="row clearfix">          <div class="col-md-4 column">              <h1 class="text-left text-danger">                  header              </h1>          </div>          <div class="col-md-4 column">          </div>          <div class="col-md-4 column">          </div>      </div>      <div class="row clearfix">          <div class="col-md-2 column">          </div>          <div class="col-md-8 column bg-info">              <div class="row clearfix">                  <div class="col-md-6 column">                      <form  id="noteform" name="noteform" action="upload" method="post" enctype="multipart/form-data">                          <div class="form-group">                               <label for="exampleinputfile1"> file 1</label>                               <input type="file" id="file1" >                          </div>                          <div class="form-group">                               <label for="exampleinputfile2"> file 2</label>                               <input type="file" id="file2" >                          </div>                          <div class="form-group">                               <label for="exampleinputfile3"> file 3</label>                               <input type="file" id="file3" >                          </div>                          <div class="form-group">                               <label for="exampleinputfile4"> file 4</label>                               <input type="file" id="file4" >                          </div>                          <button type="submit" class="btn btn-default">submit</button>                      </form>                  </div>                  <div class="col-md-6 column">                      <h2>                          header 2                      </h2>                      <p>                         content                      </p>                  </div>              </div>          </div>          <div class="col-md-2 column">          </div>      </div>  </div>      </body>  </html>

normal html form without bootstrap code works fine , able upload file server. not able figure out might problem.

i able make work after replacing "id" attribute "name" in file input element.

<input type="file" id="file1" >

with

<input type="file" name="file1" >


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -