File Upload - Custom Directory
FileUpload widget enables uploading files to the application. You can now upload the file to a custom folder which provides flexibility to cater to specific requirements.
As discussed in FileUpload, a Java service against the FileUpload widget gets created automatically. You can upload a file to a custom directory by providing the path to the custom folder in the Java service.
Drag and drop the FileUpload widget. To know more, see FileUpload Basic Usage.
Go to Java services and inside
getUploadDir
method replace the upload directory path.
The uploaded file is available in the Import Resource window under Resources in the path mentioned in the Java Service. You can view the created directory and file in the below image.
Uploading File using Apache Tomcat
This section showcases using the FileUpload widget to :
- use the apache tomcat bin folder to upload files
- to package the files in the application