Hi all, there seems to be a difference in the spec...
# lucee
s
Hi all, there seems to be a difference in the specs for the named arguments in https://cfdocs.org/fileupload vs https://docs.lucee.org/reference/functions/fileupload.html. The latter seems to adhere to the CFFILE specs regarding the named arguments. How should one go about this in CFDOCS.org? Specifically the accept vs the mimeType and the nameConflict vs onConflict arguments. Lucee 5.x errors on the latters, but accepts the formers (is this even a word? 😄).
z
the names in lucee docs come directly from the function definitions
s
Meaning the Lucee docs are correct and cfdocs.org are not? Or cfdocs.org specs are correct for ACF only? Still leaves me wondering how to make cfdocs.org work for both engines? Isn't this a compatibility issue? Or am I missing something in your answer?
z
could be an incompatibility, does the lucee behaviour match the lucee docs
s
Absolutely, I get errors in Lucee 5.x when using the cfdocs.org arguments
and the Lucee docs arguments are the same as the CFFILE arguments (which work for both Lucee and ACF). This seems to be a cfscript-incompat?
Argument onConflict and nameConflict can be used interchangeably by the way, so that seems like a bonus? But a bit scetchy as well, pick one?
z
Lucee supports aliases for arguments
did you check jira for a ticket?
s
OK, nice, but a but awkward to teach to newbies, pick the one you like 😉 Anyways, maybe add an alias for mimeType as well, for accept? I'll check JIRA first 😉
z
always up for improvements! i think this is the ticket? https://luceeserver.atlassian.net/browse/LDEV-3018
i think we will change this for 6.0?
s
No, that is something else, a new ACF feature, this is more of an alias
But yes, it is deployed for 6.x and latest 5.x, so nice!
Cannot seem to find an issue in JIRA for accept vs mimeType conflict in the named arguments, should I write one up, based on LDEV-3156?
z
so you just want mimetype as an alias for accept ?
s
yup!
then cfdocs and lucee docs and acf and lucee are in accordance with eachother
z
file a bug, and then create a PR, it's dead easy 🙂https://github.com/lucee/Lucee/pull/1107/files
s
So I need to find a way to add a line between 4921 and 4922 with the code <alias>mimeType</alias> in core/src/main/java/resource/fld/core-base.fld
Can this be done via GitHub online? Only using BitBucket now for a number of years
z
you can do it via github on the web, or just find the code, search for >accept< then press . which launches vs code in the browser
s
z
welcome as a contributor
s
This page (https://docs.lucee.org/reference/functions/fileupload.html) would then also need an addition like this => Alias: mimeType I've added this to the issue above.
z
that's automatically imported when we publish a release, you can't add it manually
s
Uh, I just checked out 5.3.9 and created a feature request LDEV-4218, to change the FLD, but someone beat me to it!
In 6.0 it isn't fixed though it seems...
Am I to assume this automagically will be ported to 6.0 branch if it's already in 5.3.9? Hence I need not to anything, to as not to confuse other developers or code-merges from 5.3.9 to 6.0?
z
only file PRs against 5.3 and 6.0 (i.e. not 5.3.9), we are no longer merging 5.3 into 6.0 as we ended up with some ugly merges which just got way to complex and caused problems
ah yeah @pothys-mitrahsoft is pretty quick huh?
s
And it was already fixed for FileUploadAll, so now it soon works everywhere. Yeai, a small contribution starter from a longtime user of Lucee 🙂
p
oops, sorry for that. But your willingness to contribute to this was much appreciated. I hope your setup done for the lucee repo will help to you contribute more in the future. If you have difficulties with this please feel free to ask me or @zackster 🙂