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
| Field | Vai trò |
|---|---|
FieldName | Property entity bind navigation collection (vd Attachments). |
DataSourceFilter | OData filter đủ ?$filter=... load list file. |
IdField | Tên field ID của entity con (default "Id"). |
IsRealtime | True → push update qua WebSocket. |
IsSumary | True → render summary footer (số lượng file, tổng size). |
UpperCase | True → uppercase tên file. |
ComponentGroupId | Section 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 quaFieldName.
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).