Add a progress bar after an Submit

Asked

Viewed 229 times

0

Hello, I have a script that uploads some files, often heavy files. When I run Submit it uploads, but it shows nothing on screen until the browser copies it to the server. Would you like to add a progress bar, is there a way? If yes, someone has example. I thank you follow my code.

HTML

<div class="row">
<form method="post" action="#ACTION_CADASTRO#" enctype="multipart/form-data">
     <fieldset>
        <div class="medium-12 columns">
           <input type="file" name="arquivo" id="arquivo">
        </div>
     </div>
  <hr>
<div class="button-group" id="botoes-form">
 <button class="success large button fi-check" type="submit"> Enviar Dados</button>
</div>
</fieldset>
</form>
<div>

PHP

if (empty($_FILES['arquivo']['name'])) {  

if (move_uploaded_file($_FILES['arquivo']['tmp_name'], $_UP['pasta'] . $nome_final)) {
    return "<SCRIPT LANGUAGE='JavaScript' TYPE='text/javascript'>
            alert('Arquivo enviado com Sucesso.');
             window.location = 'home';
    </SCRIPT>";
    }
}
  • search by "upload Progress bar"

  • 1

    I recommend using Javascript or Jquery!

  • see also with bootstrap. I tomorrow make a reply.

  • To adapt in the framework is quiet, the problem is javascript...

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.