Update image_ops.ts

master
qwertyforce 2023-09-09 14:18:12 +03:00 committed by GitHub
parent 183e57771a
commit a057b92072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -269,7 +269,7 @@ async function import_image(image_buffer: Buffer, tags: string[] = [], source_ur
await fs.writeFile(`${PATH_TO_THUMBNAILS}/${new_image_id}.jpg`, thumbnail_buffer, 'binary')
if(!bypass_checks){
const res = await calculate_all_image_features(new_image_id, image_buffer)
if (!res) {
if (res.length===0) {
return "Can't calculate_all_image_features"
}
console.log(res)
@ -347,4 +347,4 @@ export default {
color_get_similar_images_by_id,
calculate_all_image_features,
delete_all_image_features
}
}