public function addUploads(EntityInterface $entity, array $uploads)
    {
        $attachments = [];
        foreach ($uploads as $path => $tags) {
            if (!(array_keys($uploads) !== range(0, count($uploads) - 1))) {
                // if only paths and no tags
                $path = $tags;
                $tags = [];
            }
            $file = Configure::read('Attachments.tmpUploadsPath') . $path;

            $attachment = $this->createAttachmentEntity($entity, $file, $tags);
            $this->save($attachment);
            $attachments[] = $attachment;
        }
        $entity->attachments = $attachments;
    }