Commit graph

48 commits

Author SHA1 Message Date
Renée Kooi
37768e1531
core: Remove .run(). 2018-04-30 12:17:13 +02:00
Artur Paikin
2aece2e184 uppy icon margin-left: 1px 2018-04-05 11:17:24 -04:00
Ifedapo Olarewaju
1688ff645e docs: update server docs cc @arturi 2018-03-14 22:59:14 +01:00
Artur Paikin
ca9d1b0aa9
Update main.js 2018-02-17 22:36:17 -05:00
Renée Kooi
a057009cf9
Remove unused files from published package (#586)
Ooooops…

Installed package size:

 - Before: 84M
 - After: 5.9M

The npmignore files are in nested folders, then they override the `files` config in package.json. It seemed difficult to change the `files` config to exclude all these things, so I opted for this instead.
2018-02-01 16:17:35 +01:00
Artur Paikin
d39c16de2a update bundled-example 2017-12-21 16:39:39 -05:00
Artur Paikin
83d604c859 Merge branch 'master' into feature/meta-result-form 2017-12-21 14:42:04 -05:00
Artur Paikin
9aa3e00411 don’t set metadata values for new files in Dashboard, use uppy.opts.meta instead 2017-12-10 20:47:56 -05:00
Artur Paikin
526b506e31 🚨🚨🚨 Remove core: prefix from all events 🚨🚨🚨
Danger! Danger!

`core:upload-progress` becomes `upload-progress` and so on.

Oh my, here goes.
2017-12-07 16:57:24 -05:00
Artur Paikin
2d4ceaec2f metadata fields and checkbox in example 2017-12-07 16:17:56 -05:00
Artur Paikin
69a21daacb
Merge pull request #414 from transloadit/improvement/a11y
[WIP] Improve accessibility: focus handling, tweak labels and more
2017-11-13 16:13:11 -05:00
Renée Kooi
874bad50d8
core: Return { successful, failed } object from .upload(). 2017-11-10 16:55:57 +01:00
Artur Paikin
7f6f4b437c add triggerUploadOnSubmit 2017-11-05 17:15:19 -05:00
Artur Paikin
f2fc9aeec3 add Form to the example, alter <form> in index.html 2017-11-03 01:48:49 -04:00
Artur Paikin
abfd1c72aa show outlines, interate focusable elements, tabindex="-1" to overlay 2017-10-27 16:01:11 -04:00
Artur Paikin
4b21fb7c83 file.type.general, file.type.specific --> file.type = 'image/jpeg'
Just use regular mime and .split('/') when needed. Big change in terms of things that might break 👀

Also, updated `fileName` assignment
2017-10-24 16:27:51 -04:00
Renée Kooi
f76d582901
Rename Tus10 to Tus. 2017-10-23 11:49:25 +02:00
Renée Kooi
172575fb79
Rename RestoreFiles to GoldenRetriever 2017-10-23 11:49:25 +02:00
Artur Paikin
fc9f2e3c1c Update main.js 2017-10-08 01:16:59 -04:00
Renée Kooi
3839d37660
Revert "restore: Check that a serviceWorker is an Uppy one before using it"
This wasn't reliable enough unfortunately.

This reverts commit 80e4a5be8e23a585782b48fb275524ef27fbf2b1.
2017-10-03 19:14:34 +02:00
Renée Kooi
30a74dfbeb
restore: Check that a serviceWorker is an Uppy one before using it 2017-10-03 19:14:33 +02:00
Renée Kooi
5f313e3743
restore: Make serviceWorker detection automagic 2017-10-03 19:14:33 +02:00
Artur Paikin
ef1c3306c6 Flatten payload params 2017-09-18 17:09:47 -04:00
Artur Paikin
63b5769e0b add closeModalOnClickOutside in example 2017-08-31 14:10:56 +03:00
Artur Paikin
fbc66be79d clean up main.js example/dev file 2017-08-24 23:59:00 +03:00
Artur Paikin
a974c9571a resizeTo --> license 2017-08-18 14:07:15 +03:00
Artur Paikin
4001ab700b Merge branch 'master' into feature/restore-files 2017-08-15 21:20:13 +03:00
Artur Paikin
a6cf96d091 add ServiceWorker.js, clean stuff up 2017-08-15 17:18:42 +03:00
Artur Paikin
0a23a4ac0c serviceworker, send fileCache even if empty 2017-08-14 19:38:32 +03:00
Artur Paikin
00257e5348 added hideUploadButton flag to hide the upload button, for cases when you want to manually stat the upload 2017-08-07 16:15:07 +02:00
Artur Paikin
59a170ec0e Initial take on using Local Storage for storing file state and Service Worker to store file blobs, and then restore on boot 2017-07-21 15:19:04 +02:00
Artur Paikin
34ea05f97d if no countdown, show “smile” right away, fixes on @goto-bus-stop comments 2017-07-16 23:57:11 +02:00
Artur Paikin
db744c7d1b fixed the closing tab or pressing “capture” multiple times issue, default “smile” without countdown 2017-07-14 21:05:02 +02:00
Artur Paikin
2e8f15fb26 countdown, timer variable, simple locale 2017-07-13 23:48:29 +02:00
Artur Paikin
6c2dfe8f7d Add onBeforeSnapshot hook and oneTwoThreeSmile
So if you set `oneTwoThreeSmile: true` in Webcam options, it will count
to 3 before taking a snapshot
2017-07-10 18:10:38 +02:00
Artur Paikin
23720da5dc clean up example 2017-07-02 23:31:12 -04:00
Artur Paikin
0405244222 fix metadata and core:file-added event 2017-07-02 06:57:16 -04:00
Artur Paikin
d271ba30eb merge master into feature/restrictions 2017-07-02 05:11:33 -04:00
Artur Paikin
b6889d586b fix main.js 2017-07-01 16:20:28 -04:00
Artur Paikin
63b8e54e9a Merge branch 'master' into feature/form-meta 2017-06-30 20:14:04 -04:00
Artur Paikin
b3349ad42d main.js 2017-06-30 20:07:08 -04:00
Artur Paikin
f42904ca37 screw it and go with promises, because it was becoming difficult internally 2017-06-30 13:26:55 -04:00
Artur Paikin
36568cd9c8 added mime-match, restrictions is object, onBeforeFileAdded and onBeforeUpload callbacks 2017-06-30 13:14:51 -04:00
Artur Paikin
faeddd2fbb Merge branch 'master' into feature/restrictions 2017-06-29 19:17:16 -04:00
Artur Paikin
047e51b77b add get-form-data, move things around 2017-06-29 19:06:04 -04:00
Artur Paikin
6f80ea709c Extract metadata from form, closes #153
This PR adds support for extracting metadata from `<form>` elements.
This was asked #153 and came up elsewhere too, I believe. You can use
it like this:

```html
<form class="MyForm" action="/">
  <input type="file" />
  <input type="hidden" name="bla" value="12333">
  <input type="text" name="yo" value="1">
  <button type="submit">Upload</button>
</form>
```

```js
uppy.use(DragDrop, {
    target: '.MyForm',
    locale: {
      strings: {chooseFile: 'Выберите файл'}
    },
    setMetaFromTargetForm: true
  })
```

Then UI acquire type plugins, like Dashboard, FileInput and DragDrop,
before mounting themselves or doing anything else, extract FormData
from the `target` `<form>` element (it must be a form currently), and
merge the object with the global `state.meta`. This is done via
`setMeta` method on core. Then, when a file is added, `state.meta` is
merged to that file’s meta right away. The ability to add more fields
via UI plugin MetaData is also still there, though probably needs an
update.

In addition a new `meta` option is added in core:

```js
const uppy = Uppy({
  debug: true,
  autoProceed: true,
  meta: {
    username: 'Artur'
  }
})
```

This way some data can be set right away, it becomes the initial
`state.meta` object.
2017-06-28 20:21:23 -04:00
Ifedapo Olarewaju
d0122f951f feature: instagram plugin [WIP] 2017-06-27 00:25:12 +01:00
Ifedapo Olarewaju
c264d390f6 docs: non bundled example 2017-06-20 17:05:14 +01:00