Welcome Guest, Not a member yet? Register   Sign In
Can't updload csv file with upload->do_upload()
#4

My mimes.php :
PHP Code:
$mimes = array( 'hqx' => 'application/mac-binhex40',
 
'cpt' => 'application/mac-compactpro',
 
'csv' => array('text/x-comma-separated-values''text/comma-separated-values''application/octet-stream''application/vnd.ms-excel''application/x-csv''text/x-csv''text/csv''application/csv''application/excel''application/vnd.msexcel'),
 ...
); 

Mi view :
PHP Code:
<?=form_open('prof/import''class="form-inline"')?>
      <div class="form-group">
        <label for="inputFile">Sélectionnez un fichier :</label>
        <input type="file" class="form-control" id="inputFile">
      </div>
      <button type="submit" class="btn btn-default">Submit</button>
    <?=form_close()?>

And I add my capture.
$this->upload->display_errors() return : Le type de fichier que vous tentez d'envoyer n'est pas autorisé. ( = The type of file you are trying to send is not allowed.).

I have no problem with other file.
Reply


Messages In This Thread
RE: Can't updload csv file with upload->do_upload() - by bvrignaud - 02-09-2015, 09:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB