Browse Source

DragDrop example: switch to templates handled by Uppy

Artur Paikin 9 years ago
parent
commit
cacd473dbe
2 changed files with 4 additions and 16 deletions
  1. 1 1
      website/src/examples/dragdrop/app.es6
  2. 3 15
      website/src/examples/dragdrop/app.html

+ 1 - 1
website/src/examples/dragdrop/app.es6

@@ -3,7 +3,7 @@ import { DragDrop, Tus10 } from 'uppy/plugins'
 
 const uppy = new Uppy({wait: false})
 uppy
-  .use(DragDrop, {selector: '#upload-target'})
+  .use(DragDrop, {target: '.UppyDragDrop-form', endpoint: 'http://master.tus.io:8080/files/'})
   .use(Tus10, {endpoint: 'http://master.tus.io:8080/files/'})
   .run()
 

+ 3 - 15
website/src/examples/dragdrop/app.html

@@ -1,17 +1,5 @@
 <!-- Basic Uppy styles -->
-<link rel="stylesheet" href="/css/uppy.css">
+<link rel="stylesheet" href="/uppy/uppy.css">
 
-<!-- <div class="UppyDragDrop"></div> -->
-
-<form id="upload-target" class="UppyDragDrop" method="post" action="/" enctype="multipart/form-data">
-  <img class="UppyDragDrop-puppy" src="/images/uppy.svg">
-  <div>
-    <input id="UppyDragDrop-input" class="UppyDragDrop-input" type="file" name="files[]" data-multiple-caption="{count} files selected" multiple />
-    <label class="UppyDragDrop-label" for="UppyDragDrop-input">
-      <strong>Choose a file</strong>
-      <span class="UppyDragDrop-dragText"> or drag it here</span>.
-    </label>
-    <!-- <button class="UppyDragDrop-btn" type="submit">Upload</button> -->
-  </div>
-  <div class="UppyDragDrop-status"></div>
-</form>
+<!-- Target DOM node -->
+<div class="UppyDragDrop"></div>