public class S3DocumentService extends Object
| Constructor and Description |
|---|
S3DocumentService() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
downloadFile(String documentUrl)
Download a file from S3.
|
static S3UploadResultDTO |
uploadFile(File file)
Upload a file to S3.
|
static S3UploadResultDTO |
uploadFile(String fileName,
byte[] fileBytes)
Upload bytes to S3.
|
public static S3UploadResultDTO uploadFile(File file) throws Exception
file - the file to uploadExceptionpublic static S3UploadResultDTO uploadFile(String fileName, byte[] fileBytes) throws Exception
fileName - name of the filefileBytes - raw file contentExceptionpublic static byte[] downloadFile(String documentUrl) throws Exception
documentUrl - for B2B_API: the s3 path (e.g. s3://bucket/path/key);
for S3_SDK: the object key in the bucket (e.g. clients/airtel/kyc/a.pdf)ExceptionCopyright © 2026. All rights reserved.