Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

The sample data service FileService should be deployed using the instructions in Deploying Data Services section.

Running the Sample

To execute the application, you have to run the command ant file_service_app as described in the Data Services Clients section. 

Service Description

The data service transfers and retrievs file data between the client and a database. The list of queries used by the data service to carry out the actions are as follows.

...

By combining functionality of the above queries, we can create a sample file management system with the use of data services.

Sample Run

Uploading files

When uploading files, after a file is selected to be sent, the file is read and the data transferred in chunks to the server. Figure below shows a file upload in progress.

Downloading files

Select a file you want to download from the file list and pressing download. After selecting the path to be saved, the file data is retrieved from the server and saved on local disk. When the user clicks download, the data receiving starts immediately as indicated by the progress bar. This is possible because of the data streaming capability of the WSO2 Data Services Server.

Previewing files

Images can be previewed using this app. Select an image file. When you click preview, the image is downloaded to memory and shown in the preview panel as follows:

Deleting files

To delete a file from the server, select the file name from the list and press the delete button. This invokes a data service operation and removes the file data from the database.

Excerpt
hiddentrue

Data services sample - File App service demo in WSO2 Data Services Server.