mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-10 08:23:11 -06:00
mediaapi/writers/upload: Make assign in-line in if
This commit is contained in:
parent
86cb8e32f7
commit
318531d011
|
|
@ -219,8 +219,7 @@ func storeFileAndMetadata(tmpDir types.Path, absBasePath types.Path, mediaMetada
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err = db.StoreMediaMetadata(mediaMetadata)
|
if err = db.StoreMediaMetadata(mediaMetadata); err != nil {
|
||||||
if err != nil {
|
|
||||||
logger.WithError(err).Warn("Failed to store metadata")
|
logger.WithError(err).Warn("Failed to store metadata")
|
||||||
removeDir(types.Path(path.Dir(finalPath)), logger)
|
removeDir(types.Path(path.Dir(finalPath)), logger)
|
||||||
return &util.JSONResponse{
|
return &util.JSONResponse{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue