diff --git a/src/github.com/matrix-org/dendrite/mediaapi/writers/download.go b/src/github.com/matrix-org/dendrite/mediaapi/writers/download.go
index eed3bb8a7..4c682ce99 100644
--- a/src/github.com/matrix-org/dendrite/mediaapi/writers/download.go
+++ b/src/github.com/matrix-org/dendrite/mediaapi/writers/download.go
@@ -347,7 +347,7 @@ func (r *downloadRequest) commitFileAndMetadata(tmpDir types.Path, absBasePath t
 		r.Logger.WithError(err).Error("Failed to move file.")
 		return updateActiveRemoteRequests
 	}
-	if duplicate == true {
+	if duplicate {
 		r.Logger.WithField("dst", finalPath).Info("File was stored previously - discarding duplicate")
 		// Continue on to store the metadata in the database
 	}
diff --git a/src/github.com/matrix-org/dendrite/mediaapi/writers/upload.go b/src/github.com/matrix-org/dendrite/mediaapi/writers/upload.go
index 497cae79e..f8e635ece 100644
--- a/src/github.com/matrix-org/dendrite/mediaapi/writers/upload.go
+++ b/src/github.com/matrix-org/dendrite/mediaapi/writers/upload.go
@@ -151,7 +151,7 @@ func storeFileAndMetadata(tmpDir types.Path, absBasePath types.Path, mediaMetada
 			JSON: jsonerror.Unknown(fmt.Sprintf("Failed to upload")),
 		}
 	}
-	if duplicate == true {
+	if duplicate {
 		logger.WithField("dst", finalPath).Info("File was stored previously - discarding duplicate")
 	}