Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public boolean write(long hash, BufferOutputStream encImage, long timestamp) {
else {
PutObjectRequest req = PutObjectRequest.builder().bucketName(bucketname).key(baseKey).contentType(map.getImageFormat().getEncoding().getContentType())
.addMetadata("x-dynmap-hash", Long.toHexString(hash)).addMetadata("x-dynmap-ts", Long.toString(timestamp)).build();
s3.putObject(req, RequestBody.fromBytes(encImage.buf));
s3.putObject(req, RequestBody.fromBytes(Arrays.copyOfRange(encImage.buf, 0, encImage.len)));
}
done = true;
} catch (S3Exception x) {
Expand Down Expand Up @@ -529,7 +529,7 @@ public boolean setPlayerFaceImage(String playername, FaceType facetype,
}
else {
PutObjectRequest req = PutObjectRequest.builder().bucketName(bucketname).key(baseKey).contentType("image/png").build();
s3.putObject(req, RequestBody.fromBytes(encImage.buf));
s3.putObject(req, RequestBody.fromBytes(Arrays.copyOfRange(encImage.buf, 0, encImage.len)));
}
done = true;
} catch (S3Exception x) {
Expand Down Expand Up @@ -582,7 +582,7 @@ public boolean setMarkerImage(String markerid, BufferOutputStream encImage) {
}
else {
PutObjectRequest req = PutObjectRequest.builder().bucketName(bucketname).key(baseKey).contentType("image/png").build();
s3.putObject(req, RequestBody.fromBytes(encImage.buf));
s3.putObject(req, RequestBody.fromBytes(Arrays.copyOfRange(encImage.buf, 0, encImage.len)));
}
done = true;
} catch (S3Exception x) {
Expand Down Expand Up @@ -745,7 +745,7 @@ else if (fileid.endsWith(".js")) {
ct = "application/x-javascript";
}
PutObjectRequest req = PutObjectRequest.builder().bucketName(bucketname).key(baseKey).contentType(ct).build();
s3.putObject(req, RequestBody.fromBytes(content.buf));
s3.putObject(req, RequestBody.fromBytes(Arrays.copyOfRange(content.buf, 0, content.len)));
standalone_cache.put(fileid, digest);
}
done = true;
Expand Down