GetTempFile always creates a file with a .tmp extension, but this is problematic for image functions
as the image file type is determined by the destination file extension.
It would be really nice to support a third parameter which allows the user to specify which file extension the temp file should have, default is of course "tmp"
I've added the feature for this ticket to create a temp file with various extensions .
The allowed extensions are txt,doc,docx,pdf,zip,img,png,tmp,jpeg,jpg.
will decide about this changes.
Pull request: https://github.com/lucee/Lucee/pull/701
Shouldn't that list of allowed file types reuse the allowed upload types as per that recent cve, i.e this.blockedExtForFileUpload as per LDEV-2174?
can this be added to the next sprint, I'm always writing extra code to deal with this as other functions in Lucee rely on the file's extension
can we have ext as an alias for extension ?
what do you think of making dir default to getTempDirectory()when used with named parameters?
I’m always writing (when this gets merged)