Closed mfriesen closed 2 months ago
For the checksum, we talked it over internally and we think we have a design that makes good sense:
AWS S3 does not calculate the checksum on its own, but calculates as a data integrity validation, so your request that expects a checksum other than etag requires that you calculate the checksum locally and send that calculation to S3 for verification
To accommodate this, our POST /documents/upload and POST /documents/{id}/upload would include an optional checksum and checksumType for each parent and child document included in the upload
At this point, there would be no additional validation aside from a data integrity check whenever the checksum is provided, i.e., if AWS S3 reaches a different result, the request will fail
Add option into the FormKiQ CloudFormation that would allow you to select your file hashing algorithm. The choices would be ETag. CRC-32, CR-32C, SHA-1, SHA-256. Depending on the algorithm selected that would be the value stored in the document "checksum" field.
A "checksumType" would need to be added as well, so if things change mid-stream there is a trace of that