|
|
@@ -72,12 +72,12 @@ class Upload extends AuthController{
|
|
|
$code = $request->post("code", "");
|
|
|
$codes = $request->post("codes", "");
|
|
|
|
|
|
- // 限制上传文件的后缀名为 mp3 和 mp4
|
|
|
- $ext = ['mp3', 'mp4'];
|
|
|
- $validate = validate(['file' => ['fileSize:104857600', 'fileExt:' . implode(',', $ext)]]);
|
|
|
- if (!$validate->check(['file' => $file])) {
|
|
|
- return app('json')->fail($validate->getError());
|
|
|
- }
|
|
|
+// // 限制上传文件的后缀名为 mp3 和 mp4
|
|
|
+// $ext = ['mp3', 'mp4'];
|
|
|
+// $validate = validate(['file' => ['fileSize:104857600', 'fileExt:' . implode(',', $ext)]]);
|
|
|
+// if (!$validate->check(['file' => $file])) {
|
|
|
+// return app('json')->fail($validate->getError());
|
|
|
+// }
|
|
|
|
|
|
$rootTmp = config('filesystem.disks.local.root') . '/' . \think\facade\Filesystem::putFile('tmp', $file);
|
|
|
|