Announcement

Collapse
No announcement yet.

Application Class not found error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Application Class not found error

    I am trying to extend an application class as follows to override the attachment path

    <?php

    namespace Espo\Custom\Core\FileStorage\Storages;

    use \Espo\Entities\Attachment;
    use \Espo\Core\Exceptions\Error;

    class EspoUploadDir extends Espo\Core\FileStorage\Storages\EspoUploadDir
    {
    protected function getFilePath(Attachment $attachment)
    {
    $sourceId = $attachment->getSourceId();
    return '/gcp/Attachments/' . $sourceId; // HERE YOUR CUSTOM PATH
    }
    }

    It seem it is not able to find the base class giving me below error -
    ERROR: Slim Application Error Type: Error Code: 0 Message: Class &quot;Espo\Custom\Core\FileStorage\Storages\Esp o\C ore\FileStorage\Storages\EspoUploadDir&quot; not found File: /var/www/html/crm/custom/Espo/Custom/Core/FileStorage/Storages/EspoUploadDir.php Line: 8 Trace
    ​​

  • #2
    use \Espo\Core\FileStorage\Storages\EspoUploadDir

    maybe

    Comment

    Working...
    X