This demo project shows basically the handling of a file upload. We asume, that the file is a image file, so we can show it inside a XdevImage component.
- How to upload a file.
- How to handle the uploaded file.
- Basic architecture.
- How to display the uploaded image in a XdevImage component.
- Clone the GIT Reporsitory or use the import function of RapiClipse
- File -> Import -> RapidClipse -> Demo Projects -> "rapidclipse-demo-image-upload"
- Start the Project
- Click on the "Upload" button to choose a image file.
Important is to realize how to process the file to its way to the browser.
- The file has to be chosen (Done by XdevUpload)
- The file must be sent to the server (Done by XdevUpload)
- There should be someone who waits for the file on server side and is ready to process the file (Done by the Receiver)
- The file has to be add to the XdevImage as a FileResource (Code inside the Receiver)
- The file has to be sent back to the client (Code inside the Receiver)
At the MainView you will see serveral UI Elements:
- XdevUpload
- XdevImage
- XdevPanel