Announcement

Collapse
No announcement yet.

Can't upload or download attachments

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

  • 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; } } }

  • #2
    Does anybody have thoughts about this?

    Comment


    • #3
      It's in your custom file.

      Comment


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

        Comment

        Working...
        X