Skip to content

File attachment is broken due to file path #38482

Description

@LorenzaIacobuzioHybrid

Description

When attaching a file, OpenCode passes the full file path as the document name to the Bedrock API. The / characters in the path cause the API to reject the request with "The document file name can only contain alphanumeric characters...". OpenCode should pass only the filename (basename), not the full path.

Image Image

Plugins

No response

OpenCode version

1.18.4

Steps to reproduce

Just try to attach any file from your local machine and see what happens

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions