The java-ftp-service is a Java Spring Boot application that provides an API for sending files to a remote server via SFTP.
URL: /sftp
Method: POST
Consumes: Multipart Form Data
Request Header(s): Authorization
Code: 200 OK
Create a .env file with the following properties using the env.example as an example:
MAVEN_USERNAME=user
MAVEN_PASSWORD=pass
TRUSTSTORE=base64encodedtruststore
TRUSTSTORE_PASSWORD=password
KEYSTORE=base64encodedkeystore
KEYSTORE_PASSWORD=password
CORS_ALLOWED_ORIGINS=https://localhost:3000
FTP_SERVICE_LOG_LEVEL=INFO
PORT=8080
SSL_ENABLED=false
SSH_HOST=localhost
SSH_USERNAME=user
SSH_PASSWORD=pass
SSH_DESTINATION_FOLDER=/home/user/
ID_RSA=base64encodedid_rsa
ID_RSA_PUB=base64encodedid_rsa_pub
Install dependencies.
mvn -ntp dependency:go-offlineBuild the UploadService.jar file.
mvn -ntp packageStart the UploadService.jar file.
java -jar target/UploadService.jarTo build the docker image for Upload Service, run the following command.
docker-compose buildThen to execute the docker container, run the following command.
docker-compose up -d© Nicholas Adamou.
It is free software, and may be redistributed under the terms specified in the LICENSE file.