Core Docs

FileUploadGrid

Upload file dạng grid — mỗi file là 1 row có metadata (name, size, type, …).

Source: Core/Components/FileUploadGrid.cs · ComType: FileUploadGrid

Cấu hình

ComType:           FileUploadGrid
FieldName:         Attachments     # navigation collection của entity
DataSourceFilter:  ?$filter=Active eq true

Field DB dùng

FieldVai trò
FieldNameProperty entity bind navigation collection (vd Attachments).
DataSourceFilterOData filter đủ ?$filter=... load list file.
IdFieldTên field ID của entity con (default "Id").
IsRealtimeTrue → push update qua WebSocket.
IsSumaryTrue → render summary footer (số lượng file, tổng size).
UpperCaseTrue → uppercase tên file.
ComponentGroupIdSection ID (auto-set).

Events

Không fire event tới user trực tiếp — actions xử lý nội bộ.

Khi nào dùng

  • Cần lưu thông tin metadata mỗi file (loại, kích thước, ngày upload, người upload).
  • Mỗi file là 1 row trong bảng Attachment (entity riêng) bound qua FieldName.

Tip

  • Khác ImageUploader: ImageUploader chỉ lưu paths string; FileUploadGrid lưu rows entity.
  • Phù hợp khi cần audit trail (ai upload, khi nào).

Core Docs · Astro · Core.API/wwwRoot/docs