Use Azure Blob Create Cloud Disk

After you know how to use Azure blob, Today I will tell you how to create Cloud disk with Azure blob and MySql

  1. When we upload file, we will get the file md5.
  2. Store that md5 to your Mysql.
  3. When you upload file, if the md5 exist, get the url from mysql, else upload file and save md5.

In that way, same md5 file will only have one file on your blob.

I will show you a story

Figure: User green and user red, they have 5 files

Figure: Only 4 files will be upload

Figure: If User blue want to upload file1, we will only link him with the file

Thanks for watching.