How to Approve User Generated Content on a Static Website

1 replies
Last updated: Apr 2, 2020
On my content site, I’d like to have a section where users can submit a short post and upload an image to go with it. In the admin, I can approve certain posts and they appear on the main page. I can see there’s a way to upload assets though I’m wondering how to do that safely from a static site. Have you guys done this before? I’m thinking I’ll need a lambda to receive the file and do the actual upload so as not to expose client credentials in the browser. Can you guys point me to any examples?
Apr 1, 2020, 5:27 PM
if anyone needs this in the future https://www.sanity.io/docs/keeping-your-data-safe
Apr 2, 2020, 11:26 AM

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?