Browse Source

frontpage api usage example updated

Artur Paikin 8 years ago
parent
commit
889c1d8267

+ 15 - 6
website/src/api-usage-example.ejs

@@ -1,10 +1,19 @@
-import { Core, DragDrop, ProgressBar, Tus10 } from 'uppy'
+import Uppy from 'uppy/lib/core'
+import Dashboard from 'uppy/lib/plugins/Dashboard'
+import Tus10 from 'uppy/lib/plugins/Tus10'
+import Informer from 'uppy/lib/plugins/Informer'
+import MetaData from 'uppy/lib/plugins/MetaData'
  
-const uppy = new Core({autoProceed: false})
-uppy
-  .use(DragDrop, {target: '#drop-target'})
-  .use(ProgressBar, {target: 'body'})
-  .use(Tus10, {endpoint: '//tusd.tus.io/files'})
+const uppy = Uppy({autoProceed: false})
+  .use(Dashboard, {trigger: '#select-files'})
+  .use(Informer, {target: Dashboard})
+  .use(Tus10, {endpoint: '://master.tus.io/files/'})
+  .use(MetaData, {
+    fields: [
+      { id: 'resizeTo', name: 'Resize to', value: 1200, placeholder: 'specify future image size' },
+      { id: 'description', name: 'Description', value: 'none', placeholder: 'describe what the file is for' }
+    ]
+  })
   .run()
  
 uppy.on('core:success', (fileCount) => {

+ 4 - 0
website/src/frontpage-code-sample.ejs

@@ -5,4 +5,8 @@ layout: false
 You can `npm run web:update:frontpage:code:sample` to render this code snippet and
 save it as a layout partial
 -->
+{% codeblock lang:bash %}
+$ npm install uppy --save
+{% endcodeblock %}
+
 {% include_code lang:js ../api-usage-example.ejs %}

+ 0 - 9
website/src/guide/overview.md

@@ -1,9 +0,0 @@
----
-title: "Overview"
-type: guide
-order: 1
----
-
-Uppy is (going to be) an uploader written in ES6 JavaScript with a plugin-based architecture, making it very extensible. Out of the box it supports tapping into Dropbox, Instagram, Local files. It has support for resumable file uploads via tus.io, and adding encoding backends.
-
-Uppy is brought to you by the people behind Transloadit and as such has first class support for adding their uploading and encoding backend, but this is opt-in.

File diff suppressed because it is too large
+ 2 - 1
website/themes/uppy/layout/partials/frontpage-code-sample.html


Some files were not shown because too many files changed in this diff