public function addUpload(EntityInterface $entity, $upload)
    {
        $tags = [];
        $path = $upload;
        if (is_array($upload)) {
            $tags = reset($upload);
            $path = reset(array_flip($upload));
        }
        $file = Configure::read('Attachments.tmpUploadsPath') . $path;
        $attachment = $this->createAttachmentEntity($entity, $file, $tags);
        $save = $this->save($attachment);
        if ($save) {
            return $attachment;
        }
        return $save;
    }