diff --git a/src/applications/files/storage/PhabricatorFile.php b/src/applications/files/storage/PhabricatorFile.php index b55d402fbc..983788a755 100644 --- a/src/applications/files/storage/PhabricatorFile.php +++ b/src/applications/files/storage/PhabricatorFile.php @@ -127,7 +127,8 @@ final class PhabricatorFile extends PhabricatorFileDAO { array $params = array()) { $file = id(new PhabricatorFile())->loadOneWhere( - 'contentHash = %s LIMIT 1', + 'name = %s AND contentHash = %s LIMIT 1', + self::normalizeFileName(idx($params, 'name')), PhabricatorHash::digest($data)); if (!$file) {