|
@@ -354,9 +354,10 @@ class Upload
|
|
|
$this->file = $file;
|
|
|
$category = request()->post('category');
|
|
|
$category = array_key_exists($category, config('site.attachmentcategory') ?? []) ? $category : '';
|
|
|
+ $auth = Auth::instance();
|
|
|
$params = array(
|
|
|
'admin_id' => (int)session('admin.id'),
|
|
|
- 'user_id' => (int)cookie('uid'),
|
|
|
+ 'user_id' => (int)$auth->id,
|
|
|
'filename' => substr(htmlspecialchars(strip_tags($this->fileInfo['name'])), 0, 100),
|
|
|
'category' => $category,
|
|
|
'filesize' => $this->fileInfo['size'],
|