[bug]: Uploaded issue/comment/page description images get a broken `asset_url` (`.../projects/None/...`)
@vihar is already working on this.
Since Aug 6, 2026.
- Dominant language
- TypeScript
- Stars
- 59.6k
- Forks
- 5.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 49
Description
Is there an existing issue for this?
- I have searched the existing issues
Current behavior
When uploading an image meant to be embedded in an issue description, a comment, or a page (POST /api/assets/v2/workspaces/{slug}/ with entity_type set to ISSUE_DESCRIPTION, COMMENT_DESCRIPTION, or PAGE_DESCRIPTION), the created FileAsset never gets a project_id set. Because FileAsset.asset_url builds these URLs as:
f"/api/assets/v2/workspaces/{self.workspace.slug}/projects/{self.project_id}/{self.id}/"
the returned asset_url literally contains .../projects/None/..., which 404s. The uploaded image is never retrievable/visible, even though the file itself uploaded successfully to storage.
What I expect: the returned asset_url should resolve to the uploaded image (either by setting project_id correctly on creation — e.g. reading it from the request body the same way the public API's GenericAssetEndpoint does — or by resolving it server-side from the related issue/comment/page).
Steps to reproduce
POST /api/assets/v2/workspaces/{slug}/withentity_type=ISSUE_DESCRIPTION,entity_identifier=<issue_id>, validname/type/size.- Upload the file to the returned presigned POST URL (succeeds).
PATCH /api/assets/v2/workspaces/{slug}/{asset_id}/with{"is_uploaded": true}(succeeds).- Fetch the
asset_urlreturned in step 1 →404, because it containsprojects/None/. - Confirmed by inspecting the DB directly: the
FileAssetrow'sproject_idcolumn isNULL.
Environment: Self-hosted
Variant: Self-hosted (Community Edition, AIO Docker image)
Version: v1.4.0
Browser: Google Chrome (found while embedding an image via a migration script, then verified the broken URL in-browser)
Environment
Production
Browser
Google Chrome
Variant
Self-hosted
Version
v1.4.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.