Upload attachments(上传附件(Upload attachments))¶
Actions support uploading attachments from Workshop, Object Explorer, Object Views, Quiver, and Slate. Permissions to view, edit, and delete an attachment are consistent with the object to which they are uploaded. For example, if a user has view permissions to an object, they will be able to view and download attachments stored on this object. Replacing an existing attachment would require edit permissions on the object.
You can upload a single attachment or a list of attachments. To upload an attachment using actions, follow the configuration steps for both action types and object types.
Configuring action types¶
In the parameter configuration view, select Attachment as the parameter type. Attachments can only be uploaded using attachment parameter types. The corresponding column in the object-backing dataset must be a String and the edited object property must be of type Attachment.
To upload several media files at once, select Allow multiple values. Note that support for several media files in one action requires an additional toggle during object type configuration to Allow multiple, as described below.
Configuring object types¶
In the object detail view, select Attachment as the property type. Attachments can only be uploaded to attachment property types.
To upload several media files to one property, toggle Allow multiple. In this case, the property in the object-backing dataset must be an Array.
Architecture and limits¶
Attachments are immediately uploaded to Foundry once they are added to an action form. Upon form submission, permissions to view, edit, and delete an attachment are inferred from the user's permissions on the underlying object type. If form submission fails or is cancelled, the outstanding attachment is no longer directly reachable and will automatically be permanently deleted after some time. Similarly, attachments that belong to deleted objects or are no longer mapped to an object (which occurs when the corresponding property is deleted) are no longer directly reachable and will eventually automatically be permanently deleted.
Attachments are supported for both logic-backed and function-backed actions. There is a global, fixed file size limit of 200MB.
- Each attachment can be linked to a maximum of ten objects in its lifetime. If an attachment has been linked to ten objects, it cannot be linked to any other objects even if one or more of the original linked objects has been deleted. After reaching this limit of ten linked objects, you can upload the file again as a new attachment to link it to more objects.
中文翻译¶
上传附件(Upload attachments)¶
操作(Actions)支持从 Workshop、Object Explorer、Object Views、Quiver 和 Slate 上传附件。查看、编辑和删除附件的权限与上传附件所关联的对象保持一致。例如,如果用户拥有某个对象的查看权限,则能够查看并下载存储在该对象上的附件。替换现有附件则需要拥有该对象的编辑权限。
您可以上传单个附件或附件列表。要使用操作上传附件,请按照以下步骤对操作类型(Action Types)和对象类型(Object Types)进行配置。
配置操作类型(Action Types)¶
在参数配置视图中,选择 附件(Attachment) 作为参数类型。附件只能通过附件参数类型进行上传。对象所对应的数据集列必须是 字符串(String) 类型,且被编辑的对象属性必须是 附件(Attachment) 类型。
如需一次上传多个媒体文件,请选择 允许多个值(Allow multiple values)。请注意,在一个操作中支持多个媒体文件需要在对象类型配置中额外启用 允许多个(Allow multiple) 开关,具体如下所述。
配置对象类型(Object Types)¶
在对象详情视图中,选择 附件(Attachment) 作为属性类型。附件只能上传到附件属性类型。
如需向一个属性上传多个媒体文件,请启用 允许多个(Allow multiple) 开关。在这种情况下,对象所对应的数据集列必须是 数组(Array) 类型。
架构与限制(Architecture and limits)¶
附件一旦添加到操作表单中,便会立即上传至 Foundry。提交表单后,查看、编辑和删除附件的权限将根据用户对底层对象类型的权限进行推断。如果表单提交失败或被取消,未完成的附件将不再可直接访问,并会在一定时间后自动永久删除。同样,属于已删除对象或不再映射到对象(当相应属性被删除时会发生这种情况)的附件也将不再可直接访问,并最终自动永久删除。
附件同时支持基于逻辑(logic-backed)和基于函数(function-backed)的操作。全局文件大小限制为 200MB。
- 每个附件在其生命周期内最多可关联十个对象。如果某个附件已关联了十个对象,则即使其中一个或多个原始关联对象已被删除,也无法再关联到其他对象。达到十个关联对象的限制后,您可以重新上传该文件作为新附件,以将其关联到更多对象。