Form does not send POST

Asked

Viewed 251 times

0

I am developing a data import system for XLS to Mysql. The system is practically ready. I did a test with a file xls 24kb and successfully exported without any error. The problem is that I have been testing now with a file xls with 1MB and the error that occurs is that it does not seem to send the POST to the server, which it needs to send for me to upload the file. My maximum limit for sending to the server is 50MB

Form

<form class="form-horizontal" action="" method="post" enctype="multipart/form-data">

  <div class="form-group">
    <label class="col-sm-2 control-label">Banco de dados</label>
    <div class="col-sm-10">
      <input type="file" name="arquivo" class="form-control">
      <small>Envie no formado .xls</small>
    </div>
  </div>
  <div class="line line-dashed b-b line-lg pull-in"></div>

  <div class="form-group">
    <label class="col-sm-2 control-label"></label>
    <div class="col-sm-10">
     <input type="submit" class="btn btn-success" name="submitFile" value="Iniciar Importação">

Upload

if($this->input->post('submitFile')){

    $config['upload_path'] = 'uploads/tmp/';
    $config['allowed_types'] = 'xls|xlsx';
    $config['file_name'] = $this->session->userdata('user_id');
    $config['remove_spaces'] = true;
    $config['overwrite'] = true;

    $this->upload->initialize($config);

    if($this->upload->do_upload('arquivo')){
        redirect('import/database');
    }else{
        redirect('import/upload');
    }

  }
  • It sends the xls to the same php file?

  • yes, both the 24kb and the 1mb are for the same file, directory.

  • you say that it seems that you do not send the post to the server, already tried to set the max_size $config['max_size'] = 10240; (10mb) or some configuration in your php.ini?

  • I have tried yes, put 10MB and in my php.ini is post_max_size = 50m

  • You also need to set "upload_max_filesize" (upload_max_filesize = 50M).

No answers

Browser other questions tagged

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