Add a way to get the uploaded media from a comment
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- api
Research direction
Start by tracing the comment create trigger and its payload fields, especially body, hasMedia, elementTypes, and mediaUrls. Confirm how the media identifier in the body can be represented as a usable link, then verify that media comments expose the expected metadata or URL when the feature is complete.
Written by the indexing model from the issue text.
Description
If a subreddit enables media in comments and you upload an image, you get this on the comment create trigger:
{
id: 't1_nuhy413',
parentId: 't1_nuhxzxy',
body: 'test\n\n',
author: 't2_hjp31',
numReports: 0,
collapsedBecauseCrowdControl: false,
spam: false,
deleted: false,
createdAt: 1765972827314,
upvotes: 1,
downvotes: 0,
languageCode: 'und',
lastModifiedAt: -1,
gilded: false,
score: 1,
permalink: '/r/sky_elder_dev/comments/1poehvw/comment/nuhy413',
hasMedia: false,
postId: 't3_1poehvw',
subredditId: 't5_g3e97a',
elementTypes: [ 'img', 'text' ],
mediaUrls: []
}
I was expecting hasMedia to be true and mediaUrls to not be empty. The body contains the media with presumably an id of g1td0ezv7r7g1. This is not enough information to work with–we have to guess the extension. In this case, it's PNG, so that'd be https://i.redd.it/g1td0ezv7r7g1.png.
Please provide a drink link to possible media in comments or alike! Or if there is a way to do this, please let me know!
- Dominant language
- TypeScript
- Stars
- 217
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from reddit/devvit
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Bound concurrent filesystem reads during asset discovery and source ZIP generationPossibly taken @CR29-22-2805 claimed this 139 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Similar issues
-
bug data-types
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/clickhouse-js#1293 ·
Maintainers usually reply within 1 day
-
area: middleware enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
agent/quality testing
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
juspay/agent-distro#203 ·
Maintainers usually reply within 1 day