GetRequestTempFileName Method
Syntax
Context.Request.GetRequestTempFileName as C (FileExtension as C = ".tmp")
Arguments
- FileExtensionCharacter
This is optional and defaults ".tmp".
Returns
- ResultCharacter
Returns the name of a temporary file.
Description
Creates temporary file with a specified extension.
Discussion
Context.Request.GetRequestTempFileName() creates temporary file with the specified extension. The file is valid for the duration of the request. When the request is finished the file is deleted.
dim filter as c = "" dim order as c = "" dim filename as c = context.request.GetRequestTempFileName() a5w_report_saveAs(context.request.applicationRoot + "MyReport.a5rpt","pdf",filter,order,filename) if file.exists(filename) ' Prompt user to save file with alternate file name: context.response.SendFile(filename,.t.,"MyReport.pdf") end if
See Also