Skip to content

Conversation

@JustinBeckwith
Copy link
Contributor

@JustinBeckwith JustinBeckwith commented Apr 30, 2024

Fixes #6675

image

@Lulalaby
Copy link
Contributor

Lulalaby commented Apr 30, 2024

What is the reason for them to be served from media.discordapp.net instead of the usual cdn.discordapp.com btw.

@shaydewael
Copy link
Contributor

@JustinBeckwith hmm should we even have stickers in that CDN table if they aren't at the CDN base URL? if we wanna keep in table i think the callout should move up to the Image Base Url section or within an asterisk callout under the table

@JustinBeckwith
Copy link
Contributor Author

I think this call out is specific to GIF stickers - but I defer to @jkcailteux here

@jkcailteux
Copy link
Contributor

@JustinBeckwith hmm should we even have stickers in that CDN table if they aren't at the CDN base URL? if we wanna keep in table i think the callout should move up to the Image Base Url section or within an asterisk callout under the table

All stickers are technically in the CDN so its probably right to keep that there. Although i can see why its confusing since you can't access GIF stickers that way...

What is the reason for them to be served from media.discordapp.net instead of the usual cdn.discordapp.com btw.

We have to do some stuff via cloudflare workers to get our media proxy to work with GIFs in this situation (without it, theres no point in even supporting GIFs for stickers), so we have to route the request through mediaproxy and have the worker look into the CDN.

I think adding a comment like Justin has done here is probably fine, I'm not sure how else to make this less confusing, other than specifying the base url for every sticker type in its own section or something

@Lulalaby
Copy link
Contributor

Lulalaby commented May 1, 2024

Oh my beloved cloudflare..
OK fair, thanks for the insight

@Zoddo
Copy link
Contributor

Zoddo commented May 1, 2024

We have to do some stuff via cloudflare workers to get our media proxy to work with GIFs in this situation (without it, theres no point in even supporting GIFs for stickers), so we have to route the request through mediaproxy and have the worker look into the CDN.

Apparently, some CDN URL such as avatars are already transparently routed through the media proxy despite being accessed on cdn.discordapp.com.
Example: https://cdn.discordapp.com/avatars/643945264868098049/c6a249645d46209f337279cd2ca998c7.png?size=16 (size parameter work here).

Maybe you can do something similar for GIF stickers when accessed over cdn.discordapp.com?

Copy link
Contributor

@shaydewael shaydewael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oki well sorta confusing to me but i dont have a better option and better to have the info present

@shaydewael shaydewael merged commit 0a7d731 into main May 1, 2024
@shaydewael shaydewael deleted the sticky branch May 1, 2024 14:11
shaydewael pushed a commit to Jupith/discord-api-docs that referenced this pull request May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sticker CDN URL does not open for GIF format

6 participants