使用雲端軟體上傳完檔案時,難免會擔心檔案是否完全。使用 Google Drive 的同步軟體應該不用擔心壞檔,重要的檔案筆者還是會檢查一下 MD5 ,但要怎麼讓 Google 算檔案的 MD5 呢?其實只需要幾個步驟就可以了!
在 Google Drive 中查詢 MD5
一)首先進入 Google 的 Drive REST API 網頁,找到 Try it! 標題,點擊 Authorize requests using OAuth 2.0
旁邊的 OFF:

二)取消勾選其他選項,只勾 https://www.googleapis.com/auth/drive.metadata.readonly
就好,並按下 Authorize :

三)出現授權視窗,按下 接受 :

四)回到 Drive REST API 網頁,找到 fields 表格,在裡面填入 items(md5Checksum,originalFilename)
點擊 Execude:

五)找到 Response 表格就可以看到結果囉! originalFilename
是上傳時檔案的名稱,如果曾經修改過檔案名稱,表格依舊會顯示修改前的名字;md5Checksum
就是我們要的 MD5 啦!
