Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/capabilities/client/forms.mdx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also need to update: versioned_docs/version-0.12/capabilities/client/forms.mdx

Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,12 @@ const imageField = {
| `placeholder` | `string` `undefined` | Placeholder text for display before a value is present. |
| `isSecret` | `boolean` `undefined` | Makes the form field secret. |

#### Notes

- The formats supported are PNG, JPEG, WEBP, and GIF.
- The maximum file size allowed is 20 MB.
- When uploading a WEBP image, it will be converted to JPEG. As such, the Reddit URL returned points to a JPEG image.

### Group

A collection of related fields that allows for better readability.
Expand Down
13 changes: 7 additions & 6 deletions docs/capabilities/server/media-uploads.mdx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also need to update versioned_docs/version-0.12/capabilities/server/media-uploads.mdx

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Enable the `media` permission in your `devvit.json` file.
```

## Using media uploads
On the server, you can pass the URL of any remotely hosted image (even if its not hosted on Reddit) to the `media.upload` function. The media function will return a Reddit URL.
On the server, you can pass the URL of any remotely hosted image (even if its not hosted on Reddit) to the `media.upload` function. This function will return a Reddit URL. Both HTTP and data URLs are supported.

<Tabs>
<TabItem value="web" label="Devvit Web">
Expand Down Expand Up @@ -50,9 +50,10 @@ On the server, you can pass the URL of any remotely hosted image (even if its no


## Limitations
Supported file types are:
- GIF
- PNG
- JPEG

Maximum size is 20 MB.
- The formats supported are PNG, JPEG, WEBP, and GIF.
- The maximum file size allowed is 20 MB.

### Notes

- When uploading a WEBP image, it will be converted to JPEG. As such, the Reddit URL returned points to a JPEG image.