Quickstart with uppy

I’m a realy noob but I can’t undesrtand how to run a simple example like this one I found here…

a simple drag and drop page…
I’ve installed every modules with npm but if I put the index.html and the src folder in /var/www/html/ under my apache webserver I obtain only a blank page.

can someone help me?

Hi, this seems like a specific issue to your setup, not and with Uppy, and without any context it’s hard to help.

Hi, what I’m asking I’ts the most newbie question :smile:

what I need to run and display an Uppy page on my server?

Only an apache server or ngnix?

something else?

the documentation says everything but is missing the basic part…How to start

Depends which plugins you use. If you use @uppy/xhr-upload you need your own server to accept uploads.

You need to load Uppy on the client, not server-side render it. In your case the easiest thing to get started might be using the CDN:

<!-- 1. Add CSS to `<head>` -->
<link href="https://releases.transloadit.com/uppy/v3.7.0/uppy.min.css" rel="stylesheet">

<!-- 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' })

Note that you are loading many plugins you won’t be using with the CDN. So ideally you move to npm modules when possible.

1 Like