From 6167c0d2992395c14c7f4a1092a8ffe17f13cb91 Mon Sep 17 00:00:00 2001 From: Dikran Samarjian Date: Mon, 10 Aug 2026 15:12:49 -0700 Subject: [PATCH 1/3] deleting uploaded media section --- docs/capabilities/server/media-uploads.mdx | 15 +++++++++++++++ .../capabilities/server/media-uploads.mdx | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/docs/capabilities/server/media-uploads.mdx b/docs/capabilities/server/media-uploads.mdx index 7c6ba050..dd61e191 100644 --- a/docs/capabilities/server/media-uploads.mdx +++ b/docs/capabilities/server/media-uploads.mdx @@ -165,6 +165,21 @@ await reddit.submitComment({ }); ``` +## Deleting uploaded media + +Devvit does not currently provide an API to delete a media asset after it has been uploaded with `media.upload()`. + +This limitation applies to runtime Reddit-hosted uploads from `media.upload()`, not static assets bundled with your app through `media.dir` in `devvit.json`. + +The `mediaId` and `mediaUrl` returned by `media.upload()` identify a Reddit-hosted asset, but the current media API only supports upload. If your app needs to stop showing uploaded media, remove your app's references to the asset and update or delete the Reddit content that embeds it. + +For example: + +- If you store uploaded media in Redis, delete the Redis key or remove the item from your app's list of visible assets. +- If the media is embedded in a post or comment, edit or delete that post or comment when your app has permission to do so. +- Store both `mediaId` and `mediaUrl` with your app data so you can migrate to a deletion API if one becomes available later. + +If your use case requires guaranteed removal of the underlying uploaded file, media uploads may not be the right storage mechanism until deletion support exists. ## Canvas screenshots diff --git a/versioned_docs/version-0.14/capabilities/server/media-uploads.mdx b/versioned_docs/version-0.14/capabilities/server/media-uploads.mdx index 7c6ba050..dd61e191 100644 --- a/versioned_docs/version-0.14/capabilities/server/media-uploads.mdx +++ b/versioned_docs/version-0.14/capabilities/server/media-uploads.mdx @@ -165,6 +165,21 @@ await reddit.submitComment({ }); ``` +## Deleting uploaded media + +Devvit does not currently provide an API to delete a media asset after it has been uploaded with `media.upload()`. + +This limitation applies to runtime Reddit-hosted uploads from `media.upload()`, not static assets bundled with your app through `media.dir` in `devvit.json`. + +The `mediaId` and `mediaUrl` returned by `media.upload()` identify a Reddit-hosted asset, but the current media API only supports upload. If your app needs to stop showing uploaded media, remove your app's references to the asset and update or delete the Reddit content that embeds it. + +For example: + +- If you store uploaded media in Redis, delete the Redis key or remove the item from your app's list of visible assets. +- If the media is embedded in a post or comment, edit or delete that post or comment when your app has permission to do so. +- Store both `mediaId` and `mediaUrl` with your app data so you can migrate to a deletion API if one becomes available later. + +If your use case requires guaranteed removal of the underlying uploaded file, media uploads may not be the right storage mechanism until deletion support exists. ## Canvas screenshots From ec07722a5efd533ff077f228fd69c46d222c6e02 Mon Sep 17 00:00:00 2001 From: Dikran Samarjian Date: Mon, 10 Aug 2026 15:17:13 -0700 Subject: [PATCH 2/3] tone updates --- docs/capabilities/server/media-uploads.mdx | 2 +- .../version-0.14/capabilities/server/media-uploads.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/capabilities/server/media-uploads.mdx b/docs/capabilities/server/media-uploads.mdx index dd61e191..a3b46572 100644 --- a/docs/capabilities/server/media-uploads.mdx +++ b/docs/capabilities/server/media-uploads.mdx @@ -179,7 +179,7 @@ For example: - If the media is embedded in a post or comment, edit or delete that post or comment when your app has permission to do so. - Store both `mediaId` and `mediaUrl` with your app data so you can migrate to a deletion API if one becomes available later. -If your use case requires guaranteed removal of the underlying uploaded file, media uploads may not be the right storage mechanism until deletion support exists. +If your app requires guaranteed deletion of uploaded files, avoid using `media.upload()` for that workflow until deletion support is available. ## Canvas screenshots diff --git a/versioned_docs/version-0.14/capabilities/server/media-uploads.mdx b/versioned_docs/version-0.14/capabilities/server/media-uploads.mdx index dd61e191..a3b46572 100644 --- a/versioned_docs/version-0.14/capabilities/server/media-uploads.mdx +++ b/versioned_docs/version-0.14/capabilities/server/media-uploads.mdx @@ -179,7 +179,7 @@ For example: - If the media is embedded in a post or comment, edit or delete that post or comment when your app has permission to do so. - Store both `mediaId` and `mediaUrl` with your app data so you can migrate to a deletion API if one becomes available later. -If your use case requires guaranteed removal of the underlying uploaded file, media uploads may not be the right storage mechanism until deletion support exists. +If your app requires guaranteed deletion of uploaded files, avoid using `media.upload()` for that workflow until deletion support is available. ## Canvas screenshots From 6bb52338797b7bb1cca375c39a23ce1155a6dab2 Mon Sep 17 00:00:00 2001 From: Dikran Samarjian Date: Thu, 13 Aug 2026 10:23:59 -0700 Subject: [PATCH 3/3] minor tweaks from review --- docs/capabilities/server/media-uploads.mdx | 3 --- .../version-0.14/capabilities/server/media-uploads.mdx | 3 --- 2 files changed, 6 deletions(-) diff --git a/docs/capabilities/server/media-uploads.mdx b/docs/capabilities/server/media-uploads.mdx index a3b46572..2e04da0f 100644 --- a/docs/capabilities/server/media-uploads.mdx +++ b/docs/capabilities/server/media-uploads.mdx @@ -177,9 +177,6 @@ For example: - If you store uploaded media in Redis, delete the Redis key or remove the item from your app's list of visible assets. - If the media is embedded in a post or comment, edit or delete that post or comment when your app has permission to do so. -- Store both `mediaId` and `mediaUrl` with your app data so you can migrate to a deletion API if one becomes available later. - -If your app requires guaranteed deletion of uploaded files, avoid using `media.upload()` for that workflow until deletion support is available. ## Canvas screenshots diff --git a/versioned_docs/version-0.14/capabilities/server/media-uploads.mdx b/versioned_docs/version-0.14/capabilities/server/media-uploads.mdx index a3b46572..2e04da0f 100644 --- a/versioned_docs/version-0.14/capabilities/server/media-uploads.mdx +++ b/versioned_docs/version-0.14/capabilities/server/media-uploads.mdx @@ -177,9 +177,6 @@ For example: - If you store uploaded media in Redis, delete the Redis key or remove the item from your app's list of visible assets. - If the media is embedded in a post or comment, edit or delete that post or comment when your app has permission to do so. -- Store both `mediaId` and `mediaUrl` with your app data so you can migrate to a deletion API if one becomes available later. - -If your app requires guaranteed deletion of uploaded files, avoid using `media.upload()` for that workflow until deletion support is available. ## Canvas screenshots