allow specifying a file extension for getTempFile

Description

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"

https://docs.lucee.org/reference/functions/gettempfile.html

Activity

Show:

Zac Spitzer 6 February 2022 at 19:00

Zac Spitzer 9 September 2021 at 09:57

I’m going to close this off and create a different task about the dir default

Pothys - MitrahSoft 29 December 2020 at 07:48

Yes , I've changed as per Zac said on above comments.

Pull Request: https://github.com/lucee/Lucee/pull/1148

And, Could you please give your thought about

what do you think of making dir default to {{getTempDirectory()}} when used with named parameters?
Fixed

Details

Assignee

Reporter

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Fix versions

Affects versions

Priority

Created 20 June 2019 at 13:20
Updated 23 January 2025 at 11:29
Resolved 9 September 2021 at 09:57

Flag notifications