Help getting started with Uppy

I’ve been using dropzone to handle uploads for years because of how easy it is to implement, but now I need more functionality for a project and want to try Uppy but I’m not having any luck. I feel like I’m missing something simple.

All I need to do is send drag and drop files to a local sever endpoint. The code below is based on the XHR | Uppy Uppy docs XHR Upload using CDN Uppy but I’m not getting the drag and drop box, instead an error in the inspector:

“Uncaught TypeError: Uppy is not a constructor”.

<!doctype html>
<html lang="en">
<head>
<link href="https://releases.transloadit.com/uppy/v3.25.5/uppy.min.css" rel="stylesheet">
</head>
<body>
<div id="uppy"></div>

<script type="module">
   import { Uppy, XHRUpload } from "https://releases.transloadit.com/uppy/v3.25.5/uppy.min.mjs"
   new Uppy().use(XHRUpload, { endpoint: '/test/mvcall.mvc' })
</script>
</body>
</html>

Will someone give me a quickstart on this?

When are you seeing this error? This code works for me, although it’s only an uploader plugin, you didn’t install an UI.

You can try with the Dashboard here: Uppy Dashboard - StackBlitz

Thanks for pointing that out to me, I was able to get it working by adding the dashboard include.