stv0g / gose

A tera-scale file uploader
Apache License 2.0
193 stars 7 forks source link

Calculate SHA256 checksum in browser and add is a meta-data to the uploaded object #8

Open stv0g opened 2 years ago

stv0g commented 2 years ago

S3 multi-part uploads do not calculate checksums over the whole file but only its parts.

stv0g commented 2 years ago

For resumable uploads we already have to calculate the MD5 hashes of all parts which is done before each upload by the browser. However thats different from an MD5 hash over the file as a whole.

Hashing the continuous file in the browser would also be feasible. However that would further increate the upload time if we do it ahead of the upload.

We currently need to do it ahead of time as we can not modify the metadata of an object once the S3-MPU has been created. I am considering to use CopyObject once the upload has been completed to further add more metadata.