如果你对该文章中的内容有疑问/不解,可以点击此处链接提问
要注明问题和此文章链接地址 点击此处跳转
<code class="">单个
$request->validate([
'document' => 'required|file|mimes:ppt,pptx,doc,docx,pdf,xls,xlsx|max:204800',
]);
多个
$request->validate([
'document.*' => 'required|file|mimes:ppt,pptx,doc,docx,pdf,xls,xlsx|max:204800',
]);
D:\phpStudy\WWW.FAN300.COM\xxx\vendor\swiftmailer\swiftmailer\lib\swiftmailer_generate_mimes_config.php
$valid_mime_types_preset = [
'php' => 'application/x-php',
'php3' => 'application/x-php',
'php4' => 'application/x-php',
'php5' => 'application/x-php',
'zip' => 'application/zip',
'gif' => 'image/gif',
'png' => 'image/png',
'css' => 'text/css',
'js' => 'text/javascript',
'txt' => 'text/plain',
'aif' => 'audio/x-aiff',
'aiff' => 'audio/x-aiff',
'avi' => 'video/avi',
'bmp' => 'image/bmp',
'bz2' => 'application/x-bz2',
'csv' => 'text/csv',
'dmg' => 'application/x-apple-diskimage',
'doc' => 'application/msword',
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'eml' => 'message/rfc822',
'aps' => 'application/postscript',
'exe' => 'application/x-ms-dos-executable',
'flv' => 'video/x-flv',
'gz' => 'application/x-gzip',
'hqx' => 'application/stuffit',
'htm' => 'text/html',
'html' => 'text/html',
'jar' => 'application/x-java-archive',
'jpeg' => 'image/jpeg',
'jpg' => 'image/jpeg',
'm3u' => 'audio/x-mpegurl',
'm4a' => 'audio/mp4',
'mdb' => 'application/x-msaccess',
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'mov' => 'video/quicktime',
'mp3' => 'audio/mpeg',
'mp4' => 'video/mp4',
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'odg' => 'vnd.oasis.opendocument.graphics',
'odp' => 'vnd.oasis.opendocument.presentation',
'odt' => 'vnd.oasis.opendocument.text',
'ods' => 'vnd.oasis.opendocument.spreadsheet',
'ogg' => 'audio/ogg',
'pdf' => 'application/pdf',
'ppt' => 'application/vnd.ms-powerpoint',
'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'ps' => 'application/postscript',
'rar' => 'application/x-rar-compressed',
'rtf' => 'application/rtf',
'tar' => 'application/x-tar',
'sit' => 'application/x-stuffit',
'svg' => 'image/svg+xml',
'tif' => 'image/tiff',
'tiff' => 'image/tiff',
'ttf' => 'application/x-font-truetype',
'vcf' => 'text/x-vcard',
'wav' => 'audio/wav',
'wma' => 'audio/x-ms-wma',
'wmv' => 'audio/x-ms-wmv',
'xls' => 'application/vnd.ms-excel',
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'xml' => 'application/xml',
];
</code>