Skip to content

Commit

Permalink
fix(slb-495): update file upload logic to use current user id
Browse files Browse the repository at this point in the history
  • Loading branch information
dspachos committed Dec 18, 2024
1 parent dbd7b59 commit eaca85a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ function _silverback_ai_import_form_submit(array $form, FormStateInterface $form
'filename' => basename($filepath),
'uri' => $filepath,
'status' => 1,
'uid' => 1,
'uid' => \Drupal::currentUser()->id() ?? 1,
]);
$file->save();

if ($file && $type == 'docx') {
// $file = \Drupal::entityTypeManager()->getStorage('file')->load($fid);
Expand Down

0 comments on commit eaca85a

Please sign in to comment.