$ cd {path}/fileupload
..fileupload$ docker-compose up -d postgres scan
fileupload$ ./mvnw clean && ./mvnw package
fileupload$ docker-compose up -d .
curl --location 'http://localhost:8080/api/v1/file/upload' \
--header 'accept: */*' \
--header 'Content-Type: multipart/form-data' \
--form 'file=@"./src/main/resources/zfilestorage/dump/dump.txt"'
Simple Upload File Architecture and Implementation with Spring Boot
- Spring Boot Rest Controller with Maltilpart to handle data stream from client-side
Clamav
is used to scan file virus- Generate UUID or filekey to attach with the file metadata (filesize, filename...)
- Store file in the storage with filekey
You can fetch from the storage with the filekey