[Download] | [Documentation Home] | [Release Note]
This sample demonstrates a file upload/download/preview application with the usage of several features that is available in WSO2 Data Services Server. Some notable functions are listed below.
The sample data service "FileService" should be deployed as per the instructions mentioned in Deploying Samples section.
A GUI based application is used here in showing the above mentioned features. As shown in Data Services Clients Sample, run the command "ant file_service_app", to execute the application.
The data service is based around the functionality of transferring and retrieval of file data between the client and a database. Below contains the list of queries that is being used in the data service in carrying out the aforementioned actions.
By using the combined functionality of the above queries, we can create a sample file management system with the use of data services.
When uploading files, after a file is selected to be sent, the file is read and the data is transferred in chunks to the server. Figure 1 shows a file upload in progress.
Figure 1: Uploading a file.
Select a file you want to download from the file list and pressing download. Then after selecting the path to be saved, the file data will be retrived from the server and will be saved on local disk. You will notice that, when you click download, the data starts receiving immediately, as indicated by the progress bar. This is possible because of the data streaming capability of WSO2 Data Services Server.
Figure 2: Downloading a file.