Closed tieuutaa closed 5 years ago
The response is truncated. What is the full response?
}
if ($success) {
Session::put('file', $fileDOCXs);
return redirect()->route('dl-download');
}
} else {
Session::put('error', 'File bạn lựa chọn không phải định dạng PDF hoặc kích thước file quá lớn ,
Vui lòng thực hiện lại ');
return redirect()->route('pdf-to-docx');
}
}
return view('convert-docx');
This is not the response body. The issue seems not to be related to this SDK, please ask on StackOverflow instead.
i have errors when i convert file pdf size 60mb Client error:
POST https://eliza.infra.cloudconvert.com/process/505c9db3-08c8-425d-8bd5-bb56ff1a5894
resulted in a400 Bad Request
response: {"id":"505c9db3-08c8-425d-8bd5-bb56ff1a5894","url":"//eliza.infra.cloudconvert.com/process/505c9db3-08c8-425d-8bd5-bb56f (truncated...) How can i fix it this my code public function convertJPG(Request $request) { $files = $request->file('file'); set_time_limit(900); $ConvertPDF = new CloudConvert(); $ConvertPDF->setApiKey('PUJBbPxiTOWUXxiIUIRiv8ftcM8PpzRTxiWK8CLdqUJvalWydIcpl3nCh3YdIzng'); if ($files) { if ($this->checkFilePDF($files)) { $fileJPGs = []; $destinationPath = 'uploads'; foreach ($files as $file) { $fileName = $file->getClientOriginalName(); $file->move($destinationPath, $fileName); $fileJPG = 'uploads/' . str_replace("pdf", "jpg", $fileName); $currentFile = "uploads/" . $fileName; if (file_exists($currentFile)) { $variables = ['name' => 'John Doe', 'address' => 'Wall Street']; $success = $ConvertPDF->file($currentFile)->templating($variables)->to($fileJPG); $success = true; } else { $success = false; } }