Mercurial > hg > orthanc
comparison Core/FileStorage/FileStorageAccessor.cpp @ 693:01d8611c4a60
md5 for attached files
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 04 Feb 2014 17:52:51 +0100 |
parents | 2d0a347e8cfc |
children | a811bdf8b8eb |
comparison
equal
deleted
inserted
replaced
692:1a3f9d90a2dd | 693:01d8611c4a60 |
---|---|
36 { | 36 { |
37 FileInfo FileStorageAccessor::WriteInternal(const void* data, | 37 FileInfo FileStorageAccessor::WriteInternal(const void* data, |
38 size_t size, | 38 size_t size, |
39 FileContentType type) | 39 FileContentType type) |
40 { | 40 { |
41 return FileInfo(storage_.Create(data, size), type, size); | 41 std::string md5; |
42 | |
43 if (storeMD5_) | |
44 { | |
45 Toolbox::ComputeMD5(md5, data, size); | |
46 } | |
47 | |
48 return FileInfo(storage_.Create(data, size), type, size, md5); | |
42 } | 49 } |
43 } | 50 } |