From 774ed494fe03a1779de966944e6f0881b35395be Mon Sep 17 00:00:00 2001 From: William Chong Date: Thu, 20 Jun 2024 00:31:36 +0800 Subject: [PATCH] [preprocessor/webhook] use int64 for filesize --- webhook/browsertrix.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webhook/browsertrix.go b/webhook/browsertrix.go index 738d2d9..2c64507 100644 --- a/webhook/browsertrix.go +++ b/webhook/browsertrix.go @@ -29,7 +29,7 @@ type BrowsertrixCrawlFinishedResponse struct { Path string `json:"path"` Hash string `json:"hash"` Crc32 int `json:"crc32"` - Size int `json:"size"` + Size int64 `json:"size"` CrawlID string `json:"crawlId"` NumReplicas int `json:"numReplicas"` ExpireAt string `json:"expireAt"` @@ -251,7 +251,7 @@ func handleBrowsertrixEvent(w http.ResponseWriter, r *http.Request) { return } - if int(fileAttributes["file_size"].(int64)) != e.Resources[0].Size { + if fileAttributes["file_size"].(int64) != e.Resources[0].Size { log.Printf("Size mismatch: %d != %d", fileAttributes["file_size"], e.Resources[0].Size) writeJsonResponse(w, http.StatusInternalServerError, map[string]string{"error": "size mismatch"}) return