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 "Espo\Custom\Core\FileStorage\Storages\Esp o\C ore\FileStorage\Storages\EspoUploadDir" not found File: /var/www/html/crm/custom/Espo/Custom/Core/FileStorage/Storages/EspoUploadDir.php Line: 8 Trace
<?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 "Espo\Custom\Core\FileStorage\Storages\Esp o\C ore\FileStorage\Storages\EspoUploadDir" not found File: /var/www/html/crm/custom/Espo/Custom/Core/FileStorage/Storages/EspoUploadDir.php Line: 8 Trace
Comment