hawkbit-extensions
hawkbit-extensions copied to clipboard
S3 extension misuses AWS SDK to get content size
Getting the content size should not happen with s3Object.getObjectMetadata
as that is too late, and we're already GET
ting the whole blob needlessly.
From my local patch:
+ var req = new GetObjectMetadataRequest(s3Properties.getBucketName(), key);
+ var objMeta = amazonS3.getObjectMetadata(req);
This way we can get the meta-data in a simple HEAD request, which is not wasting bandwidth.