Temporal
Temporal copied to clipboard
Enabled Deduplicated File Size Calculations
This is a followup to https://github.com/RTradeLtd/Temporal/issues/476, but to extend the deduplicated size calculation to file uploads. Currently when uploading files we use the size reported by the file handler that golang has. This size may be smaller once we upload it to IPFS.
A flow that would enable us to do this is as follows:
- Check that the user account has enough credits to pay for the non-deduplicated file size
- Deduct that from their accont
- Add to IPFS
- Get the deduplicated size after adding to IPFS
- If smaller, return the difference in credits to the user account
- Update their database record with the deduplicated size