Skip to content

Commit

Permalink
fix: new images path (#11096)
Browse files Browse the repository at this point in the history
new images symlinks were mistakenly created in
/srv/off/products/new_images/

I will move them to /srv/off/new_images/ so that they get processed
  • Loading branch information
stephanegigandet authored Dec 9, 2024
1 parent 2948d82 commit 8658959
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ProductOpener/Images.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1050,11 +1050,11 @@ sub process_image_upload ($product_id, $imagefield, $user_id, $time, $comment, $
# Create a link to the image in /new_images so that it can be batch processed by OCR
# and computer vision algorithms

(-e "$BASE_DIRS{PRODUCTS}/new_images") or mkdir("$BASE_DIRS{PRODUCTS}/new_images", 0755);
(-e "$BASE_DIRS{CACHE_NEW_IMAGES}") or mkdir("$BASE_DIRS{CACHE_NEW_IMAGES}", 0755);
my $code = $product_id;
$code =~ s/.*\///;
symlink("$target_image_dir/$imgid.jpg",
"$BASE_DIRS{PRODUCTS}/new_images/" . time() . "." . $code . "." . $imagefield . "." . $imgid . ".jpg");
"$BASE_DIRS{CACHE_NEW_IMAGES}/" . time() . "." . $code . "." . $imagefield . "." . $imgid . ".jpg");

# Save the image file size so that we can skip the image before processing it if it is uploaded again
$images_ref->{$size_orig} = $imgid;
Expand Down

0 comments on commit 8658959

Please sign in to comment.