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.
Uploading Files
Section titled “Uploading Files”Upload attachments through the web app by opening an idea and using the attachment panel.
- Open the idea detail view.
- Click the Attachments tab or scroll to the attachments section.
- Click Upload File or drag and drop a file onto the drop zone.
- 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.
How Attachments Are Stored
Section titled “How Attachments Are Stored”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:
| Field | Description |
|---|---|
filename | The original name of the uploaded file |
content_type | MIME type (e.g., image/png, application/pdf) |
size_bytes | File size in bytes |
r2_key | The storage key used to retrieve the file from R2 |
Attachment Links
Section titled “Attachment Links”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 Type | Purpose |
|---|---|
url | General web link |
claude-chat | Link to a Claude AI conversation |
github-repo | Link to a GitHub repository |
github-issue | Link to a GitHub issue |
attachment | Uploaded file stored in R2 |
Each idea can have multiple attachments, and each attachment is linked to exactly one idea.
Viewing Attachments
Section titled “Viewing Attachments”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)
API Access
Section titled “API Access”Retrieve attachment metadata through the idea’s links.
GET /api/v1/ideas/42The 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" } ]}Supported File Types
Section titled “Supported File Types”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.