mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 19:10:40 +00:00
.dwg fix
This commit is contained in:
@@ -88,7 +88,7 @@ class UploadFileAction
|
||||
|
||||
// Create new file
|
||||
$item = UserFile::create([
|
||||
'mimetype' => get_file_type_from_mimetype($fileMimetype),
|
||||
'mimetype' => $request->input('extension'),
|
||||
'type' => get_file_type($fileMimetype),
|
||||
'parent_id' => ($this->getFileParentId)($request, $user->id),
|
||||
'name' => $request->input('filename'),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace Domain\Maintenance\Controllers;
|
||||
|
||||
use DB;
|
||||
@@ -110,5 +111,14 @@ class UpgradeSystemController extends Controller
|
||||
->whereIn('parent_id', $teamFolderIds)
|
||||
->update(['user_id' => $teamFolder->user_id]);
|
||||
});
|
||||
|
||||
// Upgrade dwg files
|
||||
File::withTrashed()
|
||||
->where('mimetype', 'vnd.dwg')
|
||||
->cursor()
|
||||
->each(fn($file) => $file->update([
|
||||
'mimetype' => 'dwg',
|
||||
'type' => 'file',
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user