Browse Source

fix website examples

Artur Paikin 3 years ago
parent
commit
974a976cb5

+ 1 - 1
.github/CONTRIBUTING.md

@@ -188,7 +188,7 @@ The CSS standards followed in this project closely resemble those from [Medium
 ### Naming conventions
 
 This project uses naming conventions adopted from the SUIT CSS framework.
-[Read about them here](https://github.com/suitcss/suit/blob/main/doc/naming-conventions.md).
+[Read about them here](https://github.com/suitcss/suit/blob/master/doc/naming-conventions.md).
 
 To quickly summarize:
 

+ 5 - 3
website/src/examples/xhrupload/app.es6

@@ -3,18 +3,20 @@ const FileInput = require('@uppy/file-input')
 const XHRUpload = require('@uppy/xhr-upload')
 const ProgressBar = require('@uppy/progress-bar')
 
+document.querySelector('.Uppy').innerHTML = ''
+
 const uppy = new Uppy({ debug: true, autoProceed: true })
 uppy.use(FileInput, {
-  target: '.UppyForm',
+  target: '.Uppy',
 })
 uppy.use(ProgressBar, {
   target: '.UppyProgressBar',
-  hideAfterFinish: false
+  hideAfterFinish: false,
 })
 uppy.use(XHRUpload, {
   endpoint: 'https://xhr-server.herokuapp.com/upload',
   formData: true,
-  fieldName: 'files[]'
+  fieldName: 'files[]',
 })
 
 // And display uploaded files

+ 2 - 2
website/src/examples/xhrupload/app.html

@@ -1,8 +1,8 @@
 <!-- Basic Uppy styles -->
 <link rel="stylesheet" href="/uppy/uppy.min.css">
 
-<div class="UppyForm">
-  <form action="https://xhr-server.herokuapp.com/upload">
+<div class="Uppy">
+  <form action="https://xhr-server.herokuapp.com/upload" method="post">
     <h5>Uppy was not loaded — slow connection, unsupported browser, weird JS error on a page — but the upload still works, because HTML is cool like that</h5>
     <input type="file" name="files[]" multiple="">
     <button type="submit">Fallback Form Upload</button>