add checksum verification for web file attachment

To test this,
1. choose a file
2. find out its SHA1 hash (e.g., use `shasum` on it)
3. attach it to an image using the web client
4. check that it has the correct hash in the `sha1` column of the `originalfile` table
5. download it
6. check that the file locally still has the same hash as before.