Skip to content

serializeAttachments and deserializeAttachment documentation are insufficient  #11294

@hacknlove

Description

@hacknlove

Which Cloudflare product does this pertain to?

Durable Objects

Existing documentation URL(s)

https://developers.cloudflare.com/durable-objects/api/websockets/#serializeattachments-hahahugoshortcode-s7-hbhb

What changes are you suggesting?

I was not able to make this work at all.

I tried at websocket creation

const { 0: clientWebSocket, 1: serverWebSocket } = new WebSocketPair();

this.state.acceptWebSocket(serverWebSocket, tags);
serverWebSocket.serializeAttachments([value])

and at message reception

	async webSocketMessage(ws, msg) {
		ws.serializeAttachments([])
	}

It always says:

serializeAttachments is not a function

Additional information

I'm using last version of wrangler: 3.13.1

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions