Closed TheyCallMeSticky closed 4 months ago
Added check on some cases where lowercase may be sent
I still experience this problem. Did you change anything in the code or just on server-side?
[
"exception" => ErrorException {
#message: "Notice: Undefined index: Content-Disposition"
#code: 0
#file: "./vendor/ilovepdf/ilovepdf-php/src/Task.php"
#line: 295
#severity: E_NOTICE
trace: {
./vendor/ilovepdf/ilovepdf-php/src/Task.php:295 { …}
./vendor/ilovepdf/ilovepdf-php/src/Task.php:235 { …}
./src/Service/ILovePdfHandler.php:39 {
App\Service\ILovePdfHandler::compress(Email $email): array^
› mkdir($compressedPath);
› $myTaskCompress->download($path . 'compressed/');
› EmailHandler::unpackFile('output.zip', $compressedPath);
}```
(we are using an older version of the library)
Description We are experiencing an issue where the "Content-Disposition" header is missing from the API response, which is critical for our file download functionality. This problem has recently surfaced and is affecting our web application's ability to process documents through your API. We use the API for splitting files, converting images to PDFs, merging documents, and compressing files.
Steps to Reproduce
Expected Behavior The API response should include a "Content-Disposition" header with the filename, allowing our application to correctly handle the file download.
Actual Behavior The "Content-Disposition" header is missing from the API response, leading to a failure in our download logic. The issue is identified in the following code snippet from our src/Task.php at line 323:
Code Snippet (For Reference) Here is a snippet from our implementation attempting to download and process the file:
Attempts to Resolve
Additional Context This issue seems to occur randomly and has significantly impacted our ability to serve our users effectively. Any insights or advice on how to address this problem would be greatly appreciated.