Skip to content

Attachments

Attachments let you associate files with your ideas — screenshots, PDFs, design mockups, spreadsheets, or any other reference material. Files are stored in Cloudflare R2 and linked to the idea they belong to.

Upload attachments through the web app by opening an idea and using the attachment panel.

  1. Open the idea detail view.
  2. Click the Attachments tab or scroll to the attachments section.
  3. Click Upload File or drag and drop a file onto the drop zone.
  4. The file is uploaded to Cloudflare R2 and linked to the idea.

Uploads are processed immediately. Once complete, the file appears in the attachment list with its filename, content type, and file size.

Each uploaded file is stored as an object in Cloudflare R2, a globally distributed object store. The metadata for each attachment is tracked in the database with the following fields:

FieldDescription
filenameThe original name of the uploaded file
content_typeMIME type (e.g., image/png, application/pdf)
size_bytesFile size in bytes
r2_keyThe storage key used to retrieve the file from R2

Attachments are represented in the idea_links table with the link type attachment. This is one of several link types that NeuralRepo uses to connect ideas with external resources:

Link TypePurpose
urlGeneral web link
claude-chatLink to a Claude AI conversation
github-repoLink to a GitHub repository
github-issueLink to a GitHub issue
attachmentUploaded file stored in R2

Each idea can have multiple attachments, and each attachment is linked to exactly one idea.

Open any idea in the web app to see its attachments listed in the detail view. Each attachment shows:

  • The filename with a file type icon
  • The content type and human-readable file size
  • A download link to retrieve the file from R2
  • An inline preview for supported types (images, PDFs)

Retrieve attachment metadata through the idea’s links.

Terminal window
GET /api/v1/ideas/42

The response includes all links for the idea, with attachments identifiable by their type field:

{
"id": 42,
"title": "Mobile app design concepts",
"links": [
{
"id": 7,
"type": "attachment",
"url": "https://r2.neuralrepo.com/attachments/abc123.png",
"metadata": {
"filename": "wireframe-v2.png",
"content_type": "image/png",
"size_bytes": 245800,
"r2_key": "attachments/abc123.png"
}
},
{
"id": 8,
"type": "github-repo",
"url": "https://github.com/user/mobile-app"
}
]
}

NeuralRepo does not restrict file types at the application level. Any file can be uploaded and stored. However, inline previews in the web app are supported for:

  • Images: PNG, JPEG, GIF, WebP, SVG
  • Documents: PDF
  • Text: Plain text, Markdown

All other file types are available for download but do not render inline.