Commit graph

2399 commits

Author SHA1 Message Date
Renée Kooi
dde92f80a6
Transloadit: test for dynamic params 2017-07-11 20:35:39 +02:00
Renée Kooi
c58d4338a1
Transloadit: Add test for params validation after getAssemblyOptions 2017-07-11 20:35:39 +02:00
Renée Kooi
a1c0200d89
transloadit: Also validate params from getAssemblyOptions. 2017-07-11 20:35:39 +02:00
Renée Kooi
5f7d3d79cf
transloadit: Add getAssemblyOptions.
This patch adds a `getAssemblyOptions` function option to the
Transloadit plugin. This option can return an object or a Promise for an
object to configure the Transloadit assembly. The returned object can
contain `params`, a `signature`, and `fields`.

`getAssemblyOptions` is called on each file, so each file can return a
different set of options. Files that returned the same options are
bundled together and run through a single assembly. Files that return
different options will be run through different assemblies.

This means that it is now possible to make assembly parameters depend on
user input from eg. the MetaData plugin, and have different parameters
for different files. It's now also possible to generate very short-lived
signatures on the server when an upload starts.
2017-07-11 20:35:39 +02:00
AJvanLoon
36c999de1d Polished and published 2017-07-11 18:12:11 +02:00
Artur Paikin
67e63216f8 changelog 2017-07-11 16:51:23 +02:00
Renée Kooi
77b67643e0
changelog: added transloadit:assembly event 2017-07-11 16:50:32 +02:00
Artur Paikin
bbd94f993c Merge pull request #245 from goto-bus-stop/tus-no-files
tus: return immediately if no files are selected, fixes #214
2017-07-11 16:48:46 +02:00
Artur Paikin
5a64e927ae Merge pull request #252 from goto-bus-stop/bugfix/tl-complete-event
transloadit: Retrieve completed assembly for `complete` event
2017-07-11 16:12:00 +02:00
Ifedapo .A. Olarewaju
1fe87a057a blog: remove duplicate line 2017-07-11 07:06:58 +01:00
Renée Kooi
c524b10cbf
transloadit: Retrieve completed assembly for complete event
Previously, the initial assembly data was reused in the complete event…
🙈
This patch fetches the assembly status again when the socket emits
`assembly_finished`, so we're always up to date.
2017-07-10 21:33:51 +02:00
Artur Paikin
521317513b restrictions note image 2017-07-10 18:46:58 +02:00
Artur Paikin
d7aff81a15 note about note 2017-07-10 18:40:34 +02:00
Artur Paikin
eae77ea8dc add remarks about allowedFileTypes to the post 2017-07-10 18:32:20 +02:00
Artur Paikin
61b8071295 add note if restrictions are selected in Dashboard example 2017-07-10 18:11:28 +02:00
Artur Paikin
f591ee91da update changelog 2017-07-10 15:33:15 +02:00
Artur Paikin
612c2267ed 0.17 post draft 2017-07-10 15:33:15 +02:00
Artur Paikin
46b14b0c85 Merge pull request #246 from goto-bus-stop/chore/only-catch-beforeupload
core: Only catch errors from `onBeforeUpload`
2017-07-09 16:56:21 +02:00
Renée Kooi
38c91c9296
multipart: Resolve immediately if no files are selected 2017-07-09 14:25:47 +02:00
Renée Kooi
b763e157b6
core: Only catch errors from onBeforeFileAdded
62c2645, but for `onBeforeFileAdded`.
2017-07-09 14:22:54 +02:00
Artur Paikin
a98b525d28 changelog 2017-07-08 16:29:58 +02:00
Artur Paikin
4167ffae3f Merge pull request #244 from goto-bus-stop/feature/tl-assembly
transloadit: Emit event when assembly is created; add assembly data to existing events.
2017-07-08 16:27:37 +02:00
Renée Kooi
62c264500a
core: Only catch errors from onBeforeUpload
Previously this code would treat any error at all as an `onBeforeUpload`
error, and show the informer. We also lost the stack trace for errors
because `err` is stringified in the handler. This is correct for
`onBeforeUpload` rejections, since they are string reasons, but not for
other errors.

Now only actual `onBeforeUpload` errors are handled that way, and fatal
upload errors end up in the StatusBar like before and in the console,
with a stack trace.
2017-07-07 16:29:53 +02:00
Renée Kooi
ee4a58420f
transloadit: Add assembly data to :upload, :result events.
This adds a new parameter to the transloadit:upload and
transloadit:result events, containing the assembly data.

```js
uppy.on('transloadit:upload', (file, assembly) => {
  console.log('an upload was completed with template id', assembly.template_id)
})
```

```js
uppy.on('transloadit:result', (stepName, result, assembly) => {
  console.log(`${stepName}:`, result, 'from', assembly)
})
```
2017-07-07 15:30:04 +02:00
Renée Kooi
a5878b17dc
transloadit: Emit event when an assembly is created.
The `transloadit:assembly` event is emitted when an assembly is created.
It receives the assembly data in the first parameter, and the file IDs
of the files that it belongs to in the second parameter.

```js
uppy.on('transloadit:assembly', (assembly, fileIDs) => {
  const files = fileIDs.map((id) => uppy.getState().files[id])
  console.log({ assembly, files })
})
```
2017-07-07 15:22:58 +02:00
Artur Paikin
b042bb9f93 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	CHANGELOG.md
2017-07-05 14:07:13 -04:00
Artur Paikin
ee5e4e1555 changelog 2017-07-05 14:06:30 -04:00
Renée Kooi
112f4d121f
changelog: Move dynamic tl parameters to 0.18 2017-07-04 17:08:37 +02:00
Artur Paikin
c7234cd7b2 changelog 2017-07-04 11:03:51 -04:00
Artur Paikin
8c52fe6193 font-size: 16px on input to prevent zoom, move done button to the right, to make space for the modal close button on mobile 2017-07-04 00:04:17 -04:00
Artur Paikin
9d3c913cb9 Release 0.17.0 2017-07-02 23:37:59 -04:00
Artur Paikin
c215b272d4 minor readme update 2017-07-02 23:37:49 -04:00
Artur Paikin
23720da5dc clean up example 2017-07-02 23:31:12 -04:00
Artur Paikin
7927d67c06 add restrictions to website Dashboard demo 2017-07-02 23:21:54 -04:00
Artur Paikin
6d20c1eed1 add position: fixed to prevent scrolling issues with Uppy modal on mobile,
also, make tab icon larger to fit more text, tweak paddings in Provider
view
2017-07-02 18:01:45 -04:00
Artur Paikin
95d56df59a fix styles for Safari and others, rename defaultViewType --> viewType 2017-07-02 13:06:49 -04:00
Artur Paikin
33a440f936 remove unused flag isGrid 2017-07-02 13:02:42 -04:00
Artur Paikin
aac014abf6 raise limit 2017-07-02 07:37:02 -04:00
Artur Paikin
0405244222 fix metadata and core:file-added event 2017-07-02 06:57:16 -04:00
Artur Paikin
3557884a28 changelog 2017-07-02 06:01:11 -04:00
Artur Paikin
61339a00bc changelog 2017-07-02 05:43:15 -04:00
Artur Paikin
82bd69ad10 trying to increase magic script’s wait time
just to be sure
2017-07-02 05:43:05 -04:00
Artur Paikin
531a3e1a09 Merge pull request #222 from transloadit/feature/restrictions
[WIP] File restrictions: by file type, size, number of files
2017-07-02 05:33:56 -04:00
Artur Paikin
d271ba30eb merge master into feature/restrictions 2017-07-02 05:11:33 -04:00
Artur Paikin
27d69fab7e Merge pull request #241 from transloadit/feature/better-provider-ui
Provider UI overhaul
2017-07-02 05:01:13 -04:00
Artur Paikin
d979b52b73 update hexo, add Instagram demo to the website 2017-07-02 04:57:42 -04:00
Artur Paikin
5ce45a66e4 Provider UI overhaul
- Added type="button" to buttons, to prevent submitting forms
- Added `isSearchVisible`, search bar now appears after click on search
icon (up for debates ;-)
- Grid and list views, list by default
- Root directory is named by the provider title (Instagram, Dropbox),
instead of `/`
- If file size is unknown, it is not shown, as opposed to showing `?`
- Headers hidden just for now, since we only had name, and sorting by
name is not something you toggle often when selecting a file. Once we
have size and creation date there (and whatever else), let’s restore
headers
2017-07-02 04:27:52 -04:00
Artur Paikin
b6889d586b fix main.js 2017-07-01 16:20:28 -04:00
Artur Paikin
7e23f9d08a restore file name in meta
turns out, it was important for MetaData plugin and the ability to edit
file name, but also send the original
2017-07-01 16:20:19 -04:00
Artur Paikin
ba405dba13 Buttons should have type="button", otherwise they submit forms 🙀 2017-07-01 16:19:33 -04:00