diff --git a/application/common/model/Attachment.php b/application/common/model/Attachment.php index 2149aec71ebe826ec689dda2b745156c7ec534fa..21fe292d2e6a4a6aad68d850ec1e1935a55885ee 100644 --- a/application/common/model/Attachment.php +++ b/application/common/model/Attachment.php @@ -25,7 +25,7 @@ class Attachment extends Model { // 如果已经上传该资源,则不再记录 self::beforeInsert(function ($model) { - if (self::where('url', '=', $model['url'])->find()) { + if (self::where('sha1', '=', $model['sha1'])->find()) { return false; } });