<div data-ng-init="fileinput = field ? field.id : 'status_page'; uploads[fileinput] = {}">
  <div data-ng-controller="RFileUploadCtrl"
       data-flow-init="{target: fileupload_url}"
       data-flow-files-submitted="$flow.upload()"
       data-flow-name="uploads[fileinput]"
       data-flow-drop
       data-flow-drag-enter="dragClass='drag-over'"
       data-flow-drag-leave="dragClass=''"
       data-extend-flow-valid-size="public.node.maximum_filesize*1024*1024"
       data-ng-class="dragClass"
       class="drag-drop">
    <div data-ng-if="field === undefined || field.multi_entry">
      <div class="custom-file">
        <input data-ng-attr-id="customFile-{{fileinput}}" data-ng-model="_fakemodel[fileinput]" class="custom-file-input inputelem" type="file" data-ng-required="field && field.required && !uploads[fileinput].files.length" data-flow-btn />
        <label class="btn btn-sm btn-outline-secondary" data-ng-attr-for="customFile-{{fileinput}}">
          <i class="fa-solid fa-upload"></i>
          <span data-translate>Upload</span>
	</label>
        <span class="mx-2" data-translate>Select a file or drag it here.</span>
      </div>
    </div>
    <div data-ng-if="field !== undefined && !field.multi_entry">
      <div class="custom-file">
        <input id="customFile-{{fileinput}}" data-ng-model="_fakemodel[fileinput]" class="custom-file-input inputelem" data-ng-disabled="uploads[fieldinput].files.length" type="file" data-ng-required="field && field.required && !uploads[fileinput].files.length" data-flow-btn data-flow-single-file />
        <label class="btn btn-sm btn-outline-secondary" data-ng-attr-for="customFile-{{fileinput}}">
          <i class="fa-solid fa-upload"></i>
          <span data-translate>Upload</span>
        </label>
        <span class="mx-2" data-translate>Select a file or drag it here.</span>
      </div>
    </div>
    <div errors-upload></div>
  </div>
</div>
<div data-ng-include="'views/partials/rfile_upload_status.html'"></div>
