Files v2 - Use Files field in attachment (#17707)

- Add FILES field on attachment
- Adapt Attachment logic in front to use new resolver/controller
- Update files-field logic to infer applicationId from fieldMetadataId +
ask for fieldMetadataId in upload resolver
- Design update


To do in next PR : 
- Adapt activity files logic
This commit is contained in:
Etienne
2026-02-05 17:42:19 +01:00
committed by GitHub
parent e382641ac3
commit 77d15356e1
38 changed files with 1905 additions and 1533 deletions
@@ -1,5 +1,6 @@
import { type ActorMetadata } from 'twenty-shared/types';
import { type FileOutput } from 'src/engine/api/common/common-args-processors/data-arg-processor/types/file-item.type';
import { BaseWorkspaceEntity } from 'src/engine/twenty-orm/base.workspace-entity';
import { type CustomWorkspaceEntity } from 'src/engine/twenty-orm/custom.workspace-entity';
import { type EntityRelation } from 'src/engine/workspace-manager/workspace-migration/types/entity-relation.interface';
@@ -13,10 +14,14 @@ import { type WorkflowWorkspaceEntity } from 'src/modules/workflow/common/standa
import { type WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/standard-objects/workspace-member.workspace-entity';
export class AttachmentWorkspaceEntity extends BaseWorkspaceEntity {
/** @deprecated Use `file[0].label` field instead */
name: string | null;
file: FileOutput[] | null;
/** @deprecated Use `file[0].fileId` field instead */
fullPath: string | null;
/** @deprecated Use `fileCategory` field instead */
type: string | null;
/** @deprecated Use `file[0].extension` field instead */
fileCategory: string;
createdBy: ActorMetadata;
updatedBy: ActorMetadata;