Commit graph

1598 commits

Author SHA1 Message Date
Mikael Finstad
415681f659
Use cors module instead of custom cors logic (#2823)
* use cors module instead of custom cors logic #2762

- adds support for regex COMPANION_CLIENT_ORIGINS_REGEX
- encapsulate custom cors header merge logic in own middleware
- pull out non cors logic from middleware
- unit test the cors middleware

* fix capitalization

Co-authored-by: Julian Gruber <julian@juliangruber.com>

Co-authored-by: Julian Gruber <julian@juliangruber.com>
2021-03-26 19:38:23 +00:00
Niklas Salmoukas
6c4f79b3d8
Feature: add redis pubsub scope setting (#2804) 2021-03-26 13:23:55 +01:00
Mikael Finstad
2e0065a2e1
Improve companion unit testing DX (#2827) 2021-03-26 12:44:10 +01:00
Kevin van Zonneveld
7e465338cf
Upgrade to eslint-config-transloadit@1.2.0 (#2830)
* Upgrade to eslint-config-transloadit@1.2.0

* allow console.log for /bin files

* Reduce noise in PR
2021-03-25 13:51:50 +01:00
anark
28a46011d4
fix: Aws-s3-multipart sends outdated file info to upload-success event (#2828) 2021-03-25 13:07:20 +01:00
Andrew
58f996c0e4
Vue 3 support (#2755)
* basic support

* improved support

* Add all components (still buggy)

* revert && Add lockfile

* Small fixes

* import .eslintrc from master

* Fix shadowing issue

* Update packages/@uppy/vue/src/utils.js

Co-authored-by: Renée Kooi <renee@kooi.me>

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
Co-authored-by: Renée Kooi <renee@kooi.me>
2021-03-24 16:01:45 +00:00
slawexxx44
4ee3993ef5
AWS-S3 removeUploader triggered on uninstall (#2824)
Co-authored-by: Renée Kooi <renee@kooi.me>
2021-03-22 10:41:48 +01:00
Renée Kooi
c1d15abf10
error on import lint failure + some misc lint fixes (#2813)
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-03-20 11:02:49 +01:00
Alvin Wang
8c77679651
Add missing doneButtonHandler type to dashboard (#2821)
Added missing type to dashboard which is present in the documentation: https://uppy.io/docs/dashboard/#doneButtonHandler

`doneButtonHandler`
2021-03-19 21:01:28 +00:00
Dominic Eden
580677e0d0
[FIX] - @uppy/webcam - Fix issue where the modes: [‘audio-only’] option was ignored when getting tracks from the media stream. Now we check to see if the Webcam is set to ‘audio-only’ and if so, only load audio tracks. (#2810) 2021-03-19 15:58:38 +00:00
Tim Whitney
2a90571bdb
Fix: typo from seee to see (#2818) 2021-03-19 00:34:37 +00:00
Kevin van Zonneveld
be0834f5a9
Replace references to www.transloadit.com to just transloadit.com (#2812) 2021-03-18 00:16:07 +00:00
Stanislav Červeňák
9d4bd737d2
Update sk_SK.js (#2814)
Added new phrases and modified old translations
2021-03-18 00:13:53 +00:00
Stanislav Červeňák
5fafa7b7a9
image-editor: fix flipHorizontal string (#2815)
Co-authored-by: Renée Kooi <renee@kooi.me>
2021-03-17 14:37:08 +01:00
Kevin van Zonneveld
764c2ccada
Update Linter (#2796)
* relocate .vscode

* Switch to transloadit linter

* Update .eslintrc.json

* autofix code

* unlink and install eslint-config-transloadit@1.1.1

* Change 0 to "off"

* Don't change 'use strict'

* Do not vertically align

* disable key-spacing

* add import/no-extraneous-dependencies per package

* add more react/a11y warnings

* Revert "autofix code"

This reverts commit 14c8a8cde8.

* add import/no-extraneous-dependencies per example and main package

* autofix code (2)

* Allow devDependencies in ./bin

* Change import/no-extraneous-dependencies to warn again

* upgrade linter

* Set import/no-extraneous-dependencies to warn
2021-03-15 16:25:17 +00:00
Renée Kooi
6cb90c613c
companion: fix videoMediaMetadata property name 2021-03-15 16:56:32 +01:00
Adam Henley
db6fe5fd73
Add additional Google Drive Metadata (#2795)
Signed-off-by: Adam Henley <adamazing@gmail.com>

Co-authored-by: Adam Henley <adamazing@gmail.com>
2021-03-15 14:46:02 +00:00
Roy Art
b243ad79f0
Set headers just before the upload in case options changed before the upload started (#2781) 2021-03-15 14:45:30 +00:00
Renée Kooi
4bf1072363
Release 2021-03-10 13:11:28 +01:00
Renée Kooi
65297810bb
companion: fix crash when S3 is not configured (#2798)
I thought of this as a server-side issue when initially writing it, but
if you don't have S3 uploads configured, users can still target the
endpoint. So that endpoint should never crash the process.

With this change users get a 400 response when trying to start an S3 upload
of remote files if their Companion server does not support it.
2021-03-10 12:40:46 +01:00
Renée Kooi
29956dd9d3
utils: loosen flaky test 2021-03-10 12:19:12 +01:00
Renée Kooi
fc1c808ab9
companion: generate type declaration files (#2749)
So folks can use it more easily in their server-side typescript projects.

We don't have precise types for the `options` objects yet. We should add
that too.
2021-03-09 21:40:07 +00:00
Artur Paikin
502a755458
Use Array.findIndex instead of Array.indexOf in uppy.removePlugin (#2793)
* move findIndex to @uppy/utils, add tests

* use Array.findIndex instead of Array.indexOf in uppy.removePlugin

because strict comparison started failing with Vue3 Proxies
2021-03-08 18:16:01 +00:00
Artur Paikin
7d162b0dcc Release 2021-02-26 03:37:58 +00:00
Artur Paikin
8a60cf160b
Add opts.disabled for the Dashboard (#2768)
* Introduce opts.disabled for the Dashboard

* Reduce opacity, disable user-select, set cursor

* Add classes to providers' background circles

So they can be grayscaled via css

* add disableAllFocusableElements and run it in afterUpdate hook, if needed

* increase opacity for readability

* Store previous tabindex value and use it when restoring (setting disable: false)

//cc @goto-bus-stop

* Add disabled docs

* add disabled option to website example

Co-authored-by: Alexander Zaytsev <nqst@users.noreply.github.com>
2021-02-26 03:21:53 +00:00
Renée Kooi
bcdac14c46
image-editor: add missing dependency, closes #2770 2021-02-24 15:10:13 +01:00
Ethan Willis
f4f8b157c6
Make url concatenation more robust (#2777) 2021-02-23 14:11:22 +01:00
Jan Wilts
b50e9ad597
Fix Dutch spelling mistake (#2775) 2021-02-22 12:14:39 +01:00
Renée Kooi
8ae7213f78
Release 2021-02-12 11:58:46 +01:00
Renée Kooi
26524270da
transloadit: fix upload-success handler using stale data 2021-02-12 11:41:42 +01:00
Artur Paikin
2eabc33099 Release 2021-02-10 18:55:14 +00:00
Dominic Eden
183c25b128
[FIX] Safari 14.0 on Mac records audio (using the Webcam Uppy component) with MIME-type ‘audio/mp4’. Update the file extensions checker to reflect this as otherwise audio cannot be recorded with Safari. (#2753) 2021-02-10 18:26:28 +00:00
Renée Kooi
cd7f94838e
dashboard: fix showing showProgressDetails on md and up (#2760)
The DOM changed to accomodate RTL scripts, but this CSS rule was not
changed accordingly.

The StatusBar does not know its own width, so a standalone StatusBar
would never have an `.uppy-size--md` parent element. You only get that
with the Dashboard. So I've moved the rule to the Dashboard plugin, and
the selector now checks for `.uppy-Dashboard`. That element also has the
size classes.

The standalone StatusBar does not auto-hide progress details on narrow
screens. I think that's probably fine, if you're using it directly and
explicitly asking for progress details you might want to always see
them…
2021-02-10 13:10:01 +00:00
Renée Kooi
bba2a2543a
transloadit: fix polling fallback bugs (#2759)
* transloadit: fix polling attempts after Assembly completed

* core: mark postprocessing completion if upload is complete
2021-02-10 12:29:53 +00:00
Tim Koschuetzki
61dbc3173c
Companion should respect previously set value for Accesss-Control-Allow-Methods (#2726)
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2021-02-09 13:17:57 +01:00
Renée Kooi
fb23bd2a20
xhr-upload: accept a headers: (file) => {} function (#2747)
With this patch you can do
```js
uppy.use(XHRUpload, {
  headers: file => ({
    'authorization': `bearer ${global.userToken}`,
    'header-name': file.meta.someMetaValue
  })
})
```
to determine file-specific headers.

The function syntax for `headers` is only available if the `bundle`
option is `false` (the default). `bundle` uploads only use one set of
headers.
2021-02-02 09:20:35 +01:00
Joe Timmer
b52c9417cd
Adds companionHeaders to aws s3 multipart options object (#2751) 2021-02-01 10:26:07 +01:00
Renée Kooi
63c49df92f
transloadit: fix #2626 (#2748) 2021-01-28 16:32:53 +00:00
Renée Kooi
72bef8d9d7
companion: remove incorrect Expires option (#2746)
I assumed `Expires` had to do with signed URL expiration, but in the
case of `createMultipartUpload`, it affects the _uploaded file itself_.

Those files are not automatically removed but no longer cacheable after
the expiration time, which is still bad.

Thanks to @Dock1100 for raising this! Fixes #2483.
2021-01-28 17:19:23 +01:00
Artur Paikin
7c55bd855e Release 2021-01-28 16:08:14 +00:00
Renée Kooi
52760d2bb7
dashboard: improve support for right-to-left scripts (#2705)
* dashboard: fix modal position on rtl pages, fixes #2495

* Align text to the right on right-to-left pages

* core: fix default text alignment on right-to-left pages

* dashboard: fix margin in provider browser on right-to-left pages

* dashboard: use direction-aware offset properties

* provider-views: use logical offset CSS properties

* status-bar: use logical offset CSS properties

* dashboard: fix addMore icon margin on RTL pages

* dashboard: some more logical properties

* build: compile logical properties to old CSS

* dashboard: set dir attribute if page did not provide one

* status-bar: set fallback text direction if not provided

* support direction option for inline and modal dashboard

* use companion.uppy.io on deploy previews

* provider-views: fix RTL alignment of file icons

* put the dir attribute on a wrapper div

* fix icon alignment in RTL provider views

* informer: fix ? alignment in RTL mode
2021-01-27 17:13:38 +00:00
Artur Paikin
e1efe07927 Release 2021-01-27 16:22:43 +00:00
Renée Kooi
eecad13920
companion: pass-through metadata to S3, fixes #2531 (#2742) 2021-01-25 13:23:51 +00:00
Priyesh
0b4d5c5948
use multi-stage docker build (#2732)
- Using a multi-stage build so that the build dependencies
  do not end up in the final image. Saves a bit on the image
  size as well.
2021-01-19 21:42:51 +01:00
Ifedapo .A. Olarewaju
e24430cc1c
companion: delete tus error's originalRequest field before propagatin… (#2733) 2021-01-18 14:36:09 +01:00
Artur Paikin
1eff05ede7
Dashboard: emit fileId on both file-edit-start and file-edit-complete events (#2729)
* emit fileId on both file-edit-start and file-edit-complete

* update docs

* fileId  --> fileID

* fileID --> file
2021-01-15 15:58:28 +00:00
Ifedapo .A. Olarewaju
c7b097cd90
companion: add support to allow custom oauth credentials at request time (#2622)
* companion: add support to allow custom oauth credentials at request time

other affected ackages: dropbox, google-drive, zoom, instagram, facebook, onedrive, provider-views

* companion: avoid re-using "state" value from previous oauth dance

* companion: fix tests

* companion: add test for preauth endpoint

* companion: document functions

* companion: add tests for oauth credentials fetcher module

* companion: rename "params" to "parameters" to avoid ambiguity with transloadit's API

* companion: fix typos

Co-authored-by: Renée Kooi <renee@kooi.me>

* companion-client: use qs-stringify for url queries

* companion-client: rename "credentialsRequestParams" -> "companionKeysParams"

Co-authored-by: Renée Kooi <renee@kooi.me>
2021-01-15 10:50:12 +01:00
Renée Kooi
c81780230d
Add all the CI badges (#2725)
* Add all the CI badges

* flip the CI / npm version order

* add github actions tests badges to all package readmes

* remove |

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-01-13 00:30:59 +00:00
Ifedapo .A. Olarewaju
3b5d19f363
companion-client: support options cookies send rule (#2618)
* companion-client: support options cookies send rule

fixes #2241

* companion-client: prefix cookiesSendRule option with "companion"

* companion-client: set "companionCookiesRule" as optional field
2021-01-12 14:54:36 +01:00
kiloreux
1f365608be
Fixes around Github actions and Companion deploys. (#2717) 2021-01-04 11:17:26 +01:00