protected function parseFile()
    {
        $attributes = [];
        $path = $this->path;
        if (file_exists($path)) {
            $ext = pathinfo($path, PATHINFO_EXTENSION);
            $mimeType = mime_content_type($path);
            $attributes['name'] = pathinfo($path, PATHINFO_FILENAME) . '.' . $ext;
            $attributes['type'] = $mimeType;
            $content = file_get_contents($path);
            $base64 = 'data:' . $mimeType . ';base64,' . base64_encode($content);
            $attributes['data'] = $base64;
        } else {
            throw new \Exception(sprintf('File %s not found', $path));
        }

        return $attributes;
    }
protected function parseFile()
    {
        $attributes = [];
        $path = $this->path;
        if (file_exists($path)) {
            $ext = pathinfo($path, PATHINFO_EXTENSION);
            $mimeType = mime_content_type($path);
            $attributes['name'] = pathinfo($path, PATHINFO_FILENAME) . '.' . $ext;
            $attributes['type'] = $mimeType;
            $content = file_get_contents($path);
            $base64 = 'data:' . $mimeType . ';base64,' . base64_encode($content);
            $attributes['data'] = $base64;
        } else {
            throw new \Exception(sprintf('File %s not found', $path));
        }

        return $attributes;
    }
@return array

@throws \Exception