diff --git a/src/main/java/net/canfar/storage/web/resources/FileItemServerResource.java b/src/main/java/net/canfar/storage/web/resources/FileItemServerResource.java index 4a912e2..14ca274 100644 --- a/src/main/java/net/canfar/storage/web/resources/FileItemServerResource.java +++ b/src/main/java/net/canfar/storage/web/resources/FileItemServerResource.java @@ -397,7 +397,10 @@ void upload(final UploadOutputStreamWrapper outputStreamWrapper, final DataNode uploadVerifier.verifyByteCount(outputStreamWrapper.getByteCount(), ct.getHttpTransferDetails().getContentLength()); - uploadVerifier.verifyMD5(outputStreamWrapper.getCalculatedMD5(), ct.getHttpTransferDetails().getContentMD5()); + if (ct.getHttpTransferDetails().getDigest() != null) { + uploadVerifier.verifyMD5(outputStreamWrapper.getCalculatedMD5(), + ct.getHttpTransferDetails().getDigest().getSchemeSpecificPart()); + } uploadSuccess(); }