Update MediaService.php
This commit is contained in:
@@ -116,7 +116,7 @@ class MediaService {
|
||||
CURLOPT_URL => $url,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_FOLLOWLOCATION => true,
|
||||
CURLOPT_TIMEOUT => 30,
|
||||
CURLOPT_TIMEOUT => 120,
|
||||
CURLOPT_HTTPHEADER => $headers,
|
||||
]);
|
||||
$content = curl_exec($ch);
|
||||
@@ -133,11 +133,26 @@ class MediaService {
|
||||
'image/jpeg' => 'jpg',
|
||||
'image/png' => 'png',
|
||||
'image/gif' => 'gif',
|
||||
'image/webp' => 'webp',
|
||||
'audio/mpeg' => 'mp3',
|
||||
'audio/ogg' => 'ogg',
|
||||
'audio/opus' => 'opus',
|
||||
'audio/aac' => 'aac',
|
||||
'audio/amr' => 'amr',
|
||||
'video/mp4' => 'mp4',
|
||||
'video/3gpp' => '3gp',
|
||||
'video/quicktime' => 'mov',
|
||||
'text/csv' => 'csv',
|
||||
'application/pdf' => 'pdf'
|
||||
'text/plain' => 'txt',
|
||||
'application/pdf' => 'pdf',
|
||||
'application/msword' => 'doc',
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx',
|
||||
'application/vnd.ms-excel' => 'xls',
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xlsx',
|
||||
'application/vnd.ms-powerpoint' => 'ppt',
|
||||
'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'pptx',
|
||||
'application/zip' => 'zip',
|
||||
'application/x-rar-compressed' => 'rar',
|
||||
];
|
||||
return $map[$mime] ?? null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user