Image update API: added update image file ability

This commit is contained in:
Dan Brown
2023-05-29 15:06:17 +01:00
parent f78c0635ee
commit cd4b612019
3 changed files with 25 additions and 2 deletions

View File

@@ -175,6 +175,7 @@ class ImageRepo
throw new ImageUploadException(trans('errors.image_upload_replace_type'));
}
$image->refresh();
$image->updated_by = user()->id;
$image->save();
$this->imageService->replaceExistingFromUpload($image->path, $image->type, $file);