Question

In coldfusion, when do files that are uploaded using the getTempDirectory() function get deleted? I'm storing a temporary file that will eventually go in a database, but I need to run some code before I push it to my database. Once it's on the database I'll want to delete it from the temp directory. How long does it stay in the temp directory?

Était-ce utile?

La solution

They don't get deleted.

getTempDirectory() only returns a temp folder path for you to use (mostly from OS, unless you're running multi-instance). Neither CF nor your OS is responsible for deleting the content inside.

In Windows if you run Disk Cleanup tool, temp folder would be one of the provided selections but that's about it.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top