storage: download integrity check

- [x] integrity tests
- [x] merge #299

Picking up from #299, where we're implementing integrity checks for uploads.
Can the two ifs above be moved into this if block?