提交 bd96d99a 编写于 作者: R Robert Swain

mediaapi/writers/download: 500 ISE if disk and db file size differ

上级 e33438a3
......@@ -177,7 +177,10 @@ func (r *downloadRequest) respondFromLocalFile(w http.ResponseWriter, absBasePat
"fileSizeDatabase": r.MediaMetadata.FileSizeBytes,
"fileSizeDisk": stat.Size(),
}).Warn("File size in database and on-disk differ.")
// FIXME: Remove erroneous file from database?
return &util.JSONResponse{
Code: 500,
JSON: jsonerror.InternalServerError(),
}
}
r.Logger.WithFields(log.Fields{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册