Show file uploader.

This commit is contained in:
2025-07-05 20:40:48 +08:00
parent 2dfa2e3e02
commit a169918b93
5 changed files with 49 additions and 22 deletions

View File

@@ -38,6 +38,7 @@ func GetResourceByID(id uint) (model.Resource, error) {
Preload("Images").
Preload("Tags").
Preload("Files").
Preload("Files.User").
First(&r, id).Error; err != nil {
if errors.Is(err, gorm.ErrRecordNotFound) {
return model.Resource{}, model.NewNotFoundError("Resource not found")