Bug fixed the new collision check

Geez.
This commit is contained in:
Bobby Wibowo 2020-09-27 08:04:41 +07:00
parent e0901baa8b
commit 50dc747984
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF

View File

@ -201,7 +201,7 @@ self.getUniqueRandomName = async (length, extension) => {
self.onHold.add(identifier)
const file = await db.table('files')
.where('name', 'like', 'identifier.%')
.whereRaw('?? like ?', ['name', `${identifier}.%`])
.select('id')
.first()
if (file) {