Entering content frame

Function documentation File Upload and Download Locate the document in its SAP Library structure

Use

The File Transfer Service in the J2EE Engine provides an API that enables you to:

·        Create a remote file and associate it with a local one

·        Upload a file to a particular server element

·        Download a file to a local server element

This API is packed in the File Transfer Service component of the J2EE Engine (file.sda).

Integration

Using the API of Deploy Service as well, you can use this function to enable remote deployment of files.

Prerequisites

To create a remote file, you need to have a local one that you associate to the remote file.

You also need a running J2EE Engine on the host where you want to upload the file, or on the host where the file for download is.

Activities

To create a remote file and upload it on a particular server, you have to use the functions provided in com.sap.engine.services.file.FileTransfer interface and com.sap.engine.services.file.RemoteFile class. The interface enables you to use a local file as a source for a remote one. Then you can invoke the upload() method of the RemoteFile class to upload the file to a server and prepare it for deployment.

To download a file use the download() method of the RemoteFile class.

For more information about using these interfaces, see File Transfer Service API Example.

 

 

Leaving content frame