Laravel 7 Incorrect MIME Type Detected
问题 Laravel 7 on PHP 7 is detecting incorrect MIME type of application/octet-stream for .ogg extension. Here is the applicable file request dump: Illuminate\Http\UploadedFile {#1274 ▼ -test: false -originalName: "03 - See You Tonite.ogg" -mimeType: "application/octet-stream" Anybody know of a workaround for this? 回答1: Check your mime type file first: return $request->file('field_name')->getMimeType(); Now you can add the following code in the boot method in AppServiceProvider: public function