Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Upload Files

I want to upload file from input with action form but all the times the function hasFiles return 0 and getUploadedFiles return empty Array !!!! form.volt

<form action="/upload/bu0msoNiYf63pXBPLImrcoBNGuJ7yLnVPpwKgwf1t1sHzlZsllsh01MsllsM1sllsXOsllsj3Yrslls/15504" method="post" enctype="multipart/form-data">
  <div class="col-md-3">
    - Label Upload 
  <div class="col-md-4">
    <span id="uploadfile-RB-15504" class="label col-md-4"></span>
   <div class="col-md-4">
    <div class="row">
      <label for="RB-15504" class="btn btn-primary col-xs-6">
        <input id="RB-15504" type="file" multiple="multiple" style="display:none" onchange="this.form.submit()">
        choisir un fichier


public function uploadAction($uid, $id)
        Utils::debug($this->request->hasFiles());  ===> return 0
        Utils::debug($this->request->getUploadedFiles()); ===> return []

Maybe file is too large, check post_max_size and upload_max_filesize values in your php.ini
Else check your error log

edited Jan '18

thanks, I found the problem , I forget to set an attr Name to my Input file :)