Closed nilmerg closed 1 year ago
I think 🤔 I have found a bug.
No, that's intended. The same happens if you don't (auto)submit and only choose a single file again. This also overrides any and all previously set files. To upload different or more files the user needs to remove the uploaded files first.
Create a file element with/without the destination attribute, upload images, and auto-submit the form twice.
I can't reproduce that.
I can't reproduce that.
Sorry! It's a reporting module bug.
@yhabteab I've just removed the possibility to populate the element with anything else than instances of UploadedFileInterface
.
Shouldn't the element initiate a stream for the uploaded file(s) as well? At the moment the $file->getStream()
method is returning null in an on success handler trying to save the image to the database.
It's not done explicitly by the element, but lazily by the underlying library. This also should work fine, the tests for it succeed. Personally, I can't reproduce it as well. Is it maybe an issue in the reporting module again? :sweat_smile:
Is it maybe an issue in the reporting module again?
Indeed! But it's my fault 🙈. LGTM!
Shouldn't sys_get_temp_dir()
be the default? My understanding is, that I need destination
in oder to have the files preserved across request. Is that correct?
Yeeh, your questions come always right in time!
Is that correct?
Yes. It's configurable because e.g. Icinga Web uses it's own temp directory. Making sys_get_temp_dir
the default is of course an option.
@yhabteab An example usage I tested this with is:
You also need https://github.com/Icinga/ipl-web/pull/112 or https://github.com/Icinga/icingaweb2/pull/4990.