|
|
@@ -7,7 +7,6 @@ namespace App\State\Provider\Dolibarr;
|
|
|
use ApiPlatform\Metadata\GetCollection;
|
|
|
use ApiPlatform\Metadata\Operation;
|
|
|
use ApiPlatform\State\ProviderInterface;
|
|
|
-use App\Enum\Dolibarr\DolibarrDocTypeEnum;
|
|
|
use App\Service\Dolibarr\DolibarrApiService;
|
|
|
use Symfony\Component\HttpFoundation\HeaderUtils;
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
@@ -38,7 +37,7 @@ final readonly class DolibarrDocDownloadProvider implements ProviderInterface
|
|
|
|
|
|
// Build the response and attach the file to it
|
|
|
// @see https://symfony.com/doc/current/components/http_foundation.html#serving-files
|
|
|
- $response = new Response($data['content']);
|
|
|
+ $response = new Response(base64_decode($data['content']));
|
|
|
|
|
|
$response->headers->set('Charset', 'UTF-8');
|
|
|
$response->headers->set('Access-Control-Expose-Headers', 'Content-Disposition');
|