mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
mediaapi/writers/download: 500 ISE if disk and db file size differ
This commit is contained in:
parent
e33438a37e
commit
bd96d99a3a
1 changed files with 4 additions and 1 deletions
|
@ -177,7 +177,10 @@ func (r *downloadRequest) respondFromLocalFile(w http.ResponseWriter, absBasePat
|
||||||
"fileSizeDatabase": r.MediaMetadata.FileSizeBytes,
|
"fileSizeDatabase": r.MediaMetadata.FileSizeBytes,
|
||||||
"fileSizeDisk": stat.Size(),
|
"fileSizeDisk": stat.Size(),
|
||||||
}).Warn("File size in database and on-disk differ.")
|
}).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{
|
r.Logger.WithFields(log.Fields{
|
||||||
|
|
Loading…
Reference in a new issue