mirror of https://github.com/apache/jclouds.git
Handle large putBlob with filesystem blobstore
Previously large putBlob caused an OutOfMemoryError even with repeatable Payloads. Fixes JCLOUDS-248.
This commit is contained in:
parent
d60d2681d1
commit
1a003ee731
|
@ -199,7 +199,9 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy {
|
|||
if (payload.getRawContent() instanceof File)
|
||||
Files.copy((File) payload.getRawContent(), outputFile);
|
||||
else {
|
||||
if (!payload.isRepeatable()) {
|
||||
payload = Payloads.newPayload(ByteStreams.toByteArray(payload));
|
||||
}
|
||||
Files.copy(payload, outputFile);
|
||||
}
|
||||
Payloads.calculateMD5(payload);
|
||||
|
|
Loading…
Reference in New Issue