|Available in: Logi Info|| Source code name: Procedure.SaveFileUpload|
Saves a file uploaded from the user's machine.
Set the FileUploadID attribute to the ID of an InputFileUpload element from the requesting report page.
Set Filename to the location where the file will be saved. This attribute supports special tokens for the original filename. The @FileUpload tokens are only available on the Procedure.SaveFileUpload element, use the @Procedure tokens at all other times.
@FileUpload.UploadFileName~ - returns the original filename with the extension but without the path.
@FileUpload.UploadFileExtension~ - returns the original file's extension.
For example, to save a file in the web applications UploadedFiles folder, set the Filename attribute to:
Following Procedure elements can also get information about the uploaded file. (Replace "myProcedure" with the ID of the Procedure.SaveFileUpload element.)
@Procedure.myProcedure.UploadFileName~ - returns the original filename with the extension but without the the path. @Procedure.myProcedure.UploadFileExtension~ - returns the original file's extension.
@Procedure.myProcedure.UploadFileContentType~ - returns the original file's mime or content type string.
@Procedure.myProcedure.UploadFileLength~ - returns the length of the uploaded file, in bytes.
To save mulitple uploaded files, add a Procedure.SaveFileUpload element for each InputFileUpload element.
Procedure.SaveFileUpload returns an error if a file was not specified or if the file has a zero length. Use the IfError element to handle these conditions.
The web server process must have write access rights to the folder where uploaded files are saved.
Element Group:Files and Folders