Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Enabled Deduplicated File Size Calculations #477

Open
bonedaddy opened this issue Apr 19, 2020 · 0 comments
Open

Enabled Deduplicated File Size Calculations #477

bonedaddy opened this issue Apr 19, 2020 · 0 comments

Comments

@bonedaddy
Copy link
Contributor

This is a followup to #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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant