Temporal icon indicating copy to clipboard operation
Temporal copied to clipboard

Enabled Deduplicated File Size Calculations

Open bonedaddy opened this issue 5 years ago • 0 comments

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

bonedaddy avatar Apr 19 '20 00:04 bonedaddy