javascriptfile-uploaduppy

how to implement simple uppy fileuploader


this simple example does not work.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Uppy File Uploader Example</title>
  <link href="https://releases.transloadit.com/uppy/v3.7.0/uppy.min.css" rel="stylesheet">
</head>
<body>
    

    <!-- 2. Initialize -->
    <div id="uppy"></div> 
    <script type="module">
      import { Uppy, DragDrop } from "https://releases.transloadit.com/uppy/v3.7.0/uppy.min.js"
      const uppy = new Uppy()
      uppy.use(DragDrop, { target: '#uppy' })
    </script>
</body>
</html>
Uncaught SyntaxError SyntaxError: The requested module 'https://releases.transloadit.com/uppy/v3.7.0/uppy.min.js' does not provide an export named 'DragDrop'
    at (program) (c:\Users\belos\source\repos\testUppy\index.html:14:22)

i tried to change names and check docs but it does not work i did not find any solution


Solution

  • import {
        Uppy,
        Dashboard,
        Webcam,
        Tus,
    } 
    from "https://releases.transloadit.com/uppy/v3.10.0/uppy.min.mjs";
    

    I changed link from which is writen in docs to link here and it solved my issue