LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Agent
  • Middleware
  • Backends
  • Sandboxes
  • Skills
  • Subagents
  • Types
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
  • Vitest
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewAgentMiddlewareBackendsSandboxesSkillsSubagentsTypes
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
Vitest
Language
Theme
JavaScriptdeepagentsbackendscreateFileData
Function●Since v1.4

createFileData

Copy
createFileData(
  content: string | Uint8Array<ArrayBufferLike>,
  createdAt: string,
  fileFormat: "v1" | "v2" =

Used in Docs

  • Memory
View source on GitHub
"v2"
,
mimeType
:
string
)
:
FileData

Parameters

NameTypeDescription
content*string | Uint8Array<ArrayBufferLike>
createdAtstring
fileFormat"v1" | "v2"
Default:"v2"
mimeTypestring

Create a FileData object.

Defaults to v2 format (content as single string). Pass fileFormat: "v1" for backward compatibility with older readers during a rolling deployment. Binary content (Uint8Array) is only supported with v2.

File content as a string or binary Uint8Array (v2 only)

Optional creation timestamp (ISO format), defaults to now

Storage format: "v2" (default) or "v1" (legacy line array)