Can't upload or download attachments

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fehu
    Member
    • Jan 2019
    • 64

    Can't upload or download attachments

    Here's the error message I get when trying to retrieve an attachment or document attachment. I am using this for documents called Onboarding. Any idea what's wrong?

    namespace Espo\Custom\EntryPoints; use \Espo\Core\Exceptions\NotFound; use \Espo\Core\Exceptions\Forbidden; use \Espo\Core\Exceptions\BadRequest; class Onboarding extends \Espo\Core\EntryPoints\Base { public static $authRequired = true; // default action public function run() { // excecute actions invoked, if none specified throw error if(empty($_GET['action'])) { throw new BadRequest(); } else { $action = $_GET['action']; } switch ($action) { case 'getTemplateIdByOnboarding': if (empty($_GET['onboardingId'])) { throw new BadRequest(); } else { $tenancyId = $_GET['onboardingId']; } $tenancyObject = $this->getEntityManager()->getRepository('Onboarding')->where(['id'=>$onboardingId,'status'=>'Active'])->findOne(); $templateObject = $this->getEntityManager()->getRepository('Template')->where(['id'=>$onboardingObject->get("templateId")])->findOne(); $templateData['templateId'] = $templateObject->get('id'); echo(json_encode($templateData)); break; default: //code to be executed if $action is different from all labels; } } }
  • Fehu
    Member
    • Jan 2019
    • 64

    #2
    Does anybody have thoughts about this?

    Comment

    • yuri
      Member
      • Mar 2014
      • 8483

      #3
      It's in your custom file.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • Fehu
        Member
        • Jan 2019
        • 64

        #4
        It's fixed now. It was something in the EntryPoints folder.

        Comment

        Working...