]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
fix(ERP-246): replace hardcoded OUT_DIR with relative path in UploadService origin/feature_filippov_ERP-246_fix_api1_site_view
authorAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Sat, 28 Feb 2026 12:02:39 +0000 (15:02 +0300)
committerAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Sat, 28 Feb 2026 12:02:39 +0000 (15:02 +0300)
Hardcoded path /var/www/erp24/api2/json caused Permission denied errors
on production when log files were owned by non-www-data users.
Using __DIR__ . '/../api2/json' makes the path deployment-agnostic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
erp24/services/UploadService.php

index 40614fcafdf6130bc4378d2d33df012fa4de1748..bd74b951d98b5ca84bb865acc2440ef2a0f75005 100644 (file)
@@ -55,9 +55,9 @@ use yii_app\records\WriteOffsProducts;
 class UploadService {
 
     const OUT_DIR =
-//        __DIR__ . "/../json";
+        __DIR__ . "/../api2/json";
         //   "/www/api2/json";
-        "/var/www/erp24/api2/json";
+        //"/var/www/erp24/api2/json";
 
     public static function processingUpload($result)
     {