|
|
@ -104,7 +104,11 @@ public class S3ResourceRepository extends BaseResourceRepository { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public InputStream read(String filePath) throws ResourceIOException { |
|
|
|
public InputStream read(String filePath) throws ResourceIOException { |
|
|
|
GetObjectRequest request = new GetObjectRequest(bucket, filePath); |
|
|
|
GetObjectRequest request = new GetObjectRequest(bucket, filePath); |
|
|
|
|
|
|
|
try { |
|
|
|
return s3.getObject(request).getObjectContent(); |
|
|
|
return s3.getObject(request).getObjectContent(); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
return new ByteArrayInputStream(new byte[0]); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|