Hi again, Im trying to send multiple attachments using external API to OSTicket. However, Im always getting SYSTEM File Import Error: Unable to save file.
Here is part of my code:
if ($attachment) {
$localPath = '/inquiry_attachments/';
$processedArray = [];
foreach ($attachment as $filename) {
$localFilePath = $localPath . $filename;
if (Storage::exists($localFilePath)) {
$processedArray[] = $localFilePath;
}
}
$result = $processedArray;
}
$data = [
'name' => $request->input('requester_name'),
'email' => $request->input('division_email_add'),
'subject' => $request->input('school_name'),
'region' => $inqdata->region_name,
'issue_type'=> $inqdata->inquiry_type,
'service_request_type' => $inqdata->service_report_type,
'message' => "data:text/html,$htmlBody",
'attachments' => $result,
];
Always appreciate for the help.