Skip to content

gi-nx


gi-nx / createProjectAttachmentPrompt

ts
function createProjectAttachmentPrompt(formats?: (
  | "image"
  | "model"
  | "document"
  | "geo"
  | "spreadsheet"
  | string & {
})[], projectId?: string): Promise<ProjectAttachment>;

Open a file picker dialog for the user to upload a new project attachment. Project attachments are files that are shared with a project.

Parameters ​

ParameterTypeDescription
formats?( | "image" | "model" | "document" | "geo" | "spreadsheet" | string & { })[]Optional array of file type categories (see fileTypeCategories) or specific file extensions (e.g. '.pdf', '.png', '.glb')
projectId?stringOptional project to attach the file to, defaults to the active project

Returns ​

Promise<ProjectAttachment>