[v1.0.0-beta.2] QUploader changed key name (was this.name, now file.name) ?
-
While upgrading my webapp from 0.17 to 1.0.0-beta I noticed that QUploader does no longer use this.name (default ‘file’) as key name but the name of the uploaded file itself.
This makes it more complex to work with the file on the server side because the key name is unknown and e.g. the Spring parameter resolver “@RequestParam(“file”) MultipartFile file” can no longer be simply used.
I assume that there is a reason behind the change, but would it be possible to implement the previous behaviour in addition ?
(e.g. use attribute name and if defined set the key from it)Btw thanks for the excellent framework and for fixing QUploader headers and adding QUploader fields in beta.2
Martin
-
Hi @mpr , at the moment we are working on the upgrading guide, but here are the Team notes about the process:
https://gist.github.com/hawkeye64/da4b4d662ab1484bd0b532ffd871679eand Matyas from the staff generated a comparison between 0.17 and 1.0:
https://hackmd.io/4fPrV1paR56TnpNjz0Lcvg?viewTo answer your question about implementing previous behaviour: Probably not going to happen. If there is STILL something missing, please get in touch with us via an issue report, ideally a PR and via discord.
-
Hi @nothingismagick, thanks for your reply and the links. I already used the notes, but have not known the comparison of Matyas before.
Anyway as far as I can see the change of the key name of the file in the uploaded form data is not mentioned there.I‘am personally missing the fixed field name because of the reason mentioned in my post above and I don’t understand the advantage of this change.
I assume that the change was made because of the new batch option, but as far as I could test this is also working with a fixed file name. (For testing I derived my own Uploader from QUploader which used “file” as key name.)
I have opend issue 3318.
-
@mpr - right now really the best thing you can do is join the conversation at discord about v1-beta, and please be gentle, we’re working our asses off here:
There is also an issue thread on github about quploader: https://github.com/quasarframework/quasar/issues/3318
-
Added
field-name
prop for this on QUploader. Can be either Function or String. Will be available on beta.4.
More details: https://github.com/quasarframework/quasar/commit/440b762fbe63e488cb76f814e0bbd50a446e21c2