Element Details: Procedure.Save+File+Upload
 Back


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:

@Function.AppPhysicalPath~\UploadedFiles\@FileUpload.UploadFileName~

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



ATTRIBUTES

Click attribute Name to drill down for more information.

NamePossible ValuesDescription
Filename
UserDefined
(Required) A physical, file system path and filename.
FileUploadID
UserDefined
(Required) The ID value of an InputFileUpload element from the requesting report page.
ID
UserDefined
(Required) The ID attribute is a pervasive attribute that uniquely identifies an element within a definition file. The ID needs to be a unique value within the definition.



PARENT ELEMENTS

Click element to drill down for more information.

If Error
Procedure.Else
Procedure.File Exists
Procedure.Folder Exists
Procedure.If
Procedure.Run DataTable Rows
Procedure.Switch Case
Procedure.Switch Else
Task


CHILD ELEMENTS

Click element to drill down for more information.

If Error


 Back to top


 Chart Debug