Updated document logic for special amendment

This commit is contained in:
rajesh
2025-10-23 17:09:04 +05:30
parent 775f5a28b9
commit fdea8c47ce
4 changed files with 28 additions and 3 deletions

View File

@@ -10,6 +10,8 @@ import org.slf4j.LoggerFactory;
import java.io.*;
import java.net.URI;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -44,7 +46,7 @@ public class S3DocxProcessor {
// Extract bucket & key from URL
AmazonS3URI s3Uri = new AmazonS3URI(s3Url);
String bucket = s3Uri.getBucket();
String key = s3Uri.getKey();
String key = URLDecoder.decode(s3Uri.getKey(), StandardCharsets.UTF_8);
try (S3Object s3Object = s3Client.getObject(bucket, key);
InputStream originalStream = new BufferedInputStream(s3Object.getObjectContent())) {
byte[] updatedBytes=null;