You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turns out if you use a custom domain locally like http://my-site.test:3000, window.crypto.subtle isn't defined in that environment. Instead, you have to use localhost:3000 when using this plugin. It would be nice if there were a Toasted error message if the file hash generation fails. Or perhaps even disable upload entirely if the crypto APIs aren't available.
The text was updated successfully, but these errors were encountered:
Heads-up that I got caught by this
TODO
: https://github.com/robinpyon/sanity-plugin-media/blob/master/src/modules/uploads/index.ts#L198Turns out if you use a custom domain locally like
http://my-site.test:3000
,window.crypto.subtle
isn't defined in that environment. Instead, you have to uselocalhost:3000
when using this plugin. It would be nice if there were a Toasted error message if the file hash generation fails. Or perhaps even disable upload entirely if the crypto APIs aren't available.The text was updated successfully, but these errors were encountered: