Show TOC

 FileUpload and FileDownload: Data TransferLocate this document in the navigation structure

The elements FileUpload and FileDownload are used to transfer files between server and client.


With FileUpload the user can use a Browse… button to select a file on the hard disk, which will be loaded into the context during the next round trip, that is, for example, if the user clicks another button. Any further administration and storage of the file on the server is controlled internally by the Web Dynpro Framework.

You can activate a virus scanner for the FileUpload element. SAP provides the virus scan profile webdynpro_FileUpload. Refer to Delivered Virus Scan Profiles



With the FileDownload element, the user can download a file. Depending on the selected setting of the behaviour property, the user can open the file or store it on the local hard disk.

The data source, that is the file to be downloaded is determined by the resource property. To be able to load a file into the context with the FileDownload element, you need the WDResourceFactory. Insert the following code into the wdDoInit method:

IWDResource resource =  WDResourceFactory.createResource(new    byte[<number of bytes>], "<name of the file>",    WDWebResourceType.<type of the file>);

currentUiResourceElement depicts the context node under which you have created the value attribute resource of type Resource.