Coldfusion writes uploaded files to it's temporary folder, where the cffile tag will pick it up. However I want my server to ignore uploaded files and not have them written to disk at all.

How can I prevent Coldfusion from writing these files to disk?


Or is there a way to block multipart requests in IIS (7+)?


What version of ColdFusion? Assuming at least ColdFusion 9 you could use the built-in RAM file system.

Working with in-memory files

Memory-based virtual file system speeds up the processing of transient data. In-memory files are not written to disk and are saved on RAM. They function similar to disk files but perform faster.

In ColdFusion, in-memory files help you to simplify the execution of dynamic code. In-memory files are supported across almost all tags and functions that take file or directory as input or output.

You use in-memory files in the same manner as files on disk, but with a prefix ram:/// to indicate that they reside on RAM. For example, ram:///a/b/dynamic.cfm.

  • No, like before you even use cffile, any multipart form posted to you server writes a file to the temp folder. I want Coldfusion to not writ that file in the first place. – Tyler Clendenin Nov 5 '15 at 21:14
  • So you are talking about preventing the server from writing the file to disk? Are you wanting to use these files or are you trying to prevent files from being uploaded to your server? – Miguel-F Nov 5 '15 at 21:27
  • I want to prevent the file from being uploaded. OR I want Coldfusion to at the least ignore the file part of the multipart request. – Tyler Clendenin Nov 5 '15 at 22:26
  • Why not just remove the file upload capability from the form? – Miguel-F Nov 5 '15 at 23:00
  • This is to prevent a security vulnerability, you could build your own form to post a file to my server, that fie would be written to the temp folder. Ideally nothing could be done to execute that file, however, preventing the temp file writting in the first place would nip that in the bud. – Tyler Clendenin Nov 6 '15 at 23:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.