I have a file-input field in my pthml and would like to use it to upload picture files.
[...]
<div class="field file">
<label class="label" for="email"><span><?= $escaper->escapeHtmlAttr(__('Attach a picture')) ?></span></label>
<div class="control">
<input name="pictureUpload"
id="pictureUpload"
type="file"
class="input-file"
accept="image/*"
value="">
</div>
</div>
[...]
My Post-Controller works with all other inputs but not with the file.
I tried getting it via $this->getRequest()->getFiles();
and checked $_FILES
but it remains empty.
Is there another component involved that I'm missing?
My Controller extends \Magento\Framework\App\Action\Action
and implements Magento\Framework\App\Action\HttpPostActionInterface
.