|
|
@ -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); |
|
|
|
return s3.getObject(request).getObjectContent(); |
|
|
|
try { |
|
|
|
|
|
|
|
return s3.getObject(request).getObjectContent(); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
return new ByteArrayInputStream(new byte[0]); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|