Commit graph

1636 commits

Author SHA1 Message Date
Renée Kooi
bc54aeb3f5
companion: support relative redirect URLs in responses (#2901) 2021-05-26 10:28:40 +02:00
Mikael Finstad
c2c568279b
companion: fix NRP typescript errors (#2884)
* ignore ts errors

i couldn't get the @types/node-redis-pubsub to work
It seems they are incorrect (they have a namespace NRP around teh class)

* convert from class extends to factory function

* Fix bug introduced in chunkSize PR
2021-05-25 13:30:28 +01:00
Jhen-Jie Hong
2428a35cd3
url: Add missing companionCookiesRule option (#2898) 2021-05-25 10:14:30 +02:00
Renée Kooi
fa5d2ae11a
companion-client: rethrow original error objects (#2889)
Changes the HTTP request error handling logic to only replace the
message inside an Error object, instead of creating a new Error. This
should keep stack traces intact and prevents us from obscuring any
potential additional properties on the original Error.
2021-05-21 21:00:35 +01:00
Artur Paikin
42eb7fcc5a
Golden retriever 2 fixes (#2895)
* rename StatusBar-ghosts to StatusBar-serviceMsg

* resumeAll after restore

* Adjust recovered copy: remove from StatusBar, make it depend on number of ghosts, add re-select button

* Update en_US.js

* add sorting — display ghost files first

* make ghosts more opaque

//cc @nqst

* Update packages/@uppy/dashboard/src/components/FileList.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

* Update packages/@uppy/dashboard/src/components/FileList.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-05-21 17:47:39 +01:00
Alexander Zaytsev
961a5d653e
Fix incorrect font in Chrome on the Dashboard (#2887)
* Fix incorrect font in Chrome on the Dashboard

* Revert CSS; use .uppy-u-reset & .uppy-c-btn classes instead

* Cleanup
2021-05-20 22:54:20 +01:00
Ian VanSchooten
c77ddaa48e
Remove double-slash from import (#2888) 2021-05-14 10:55:08 +01:00
Artur Paikin
c4a637655d
Golden Retriever 2: Return of the Ghost (#2701)
* don’t store file.data on local files when we save to localStorage, add isGhost: true, additional event restore-confirmed

Co-Authored-By: Renée Kooi <github@kooi.me>

* Don’t double-emit upload-started for Golden Retriever-restored files that were already started

Co-Authored-By: Renée Kooi <github@kooi.me>

* removeFile: delete updatedUploads[uploadID] instead of calling _removeUpload to avoide excess state updates

Co-Authored-By: Renée Kooi <github@kooi.me>

* clear preview, throttle saving state

* add service message and ghost icons

* regenerate thumnails on restore properly

* allow replacing duplicate files if it’s a ghost

* re-generate thumbnails on componentDidUpdate

* tweak styles for ghosts

* Dashboard cleanup

* refactor: load IndexedDBStore and ServiceWorkerStore together, add uninstall, handle file-edit-complete

* recoveredState — show upload button as “restore”, hide progress pause/resume, handle abortRestore

* tweak serviceMsg mobile styles

* use i18n for strings

* Handle aborting, complete and last file removal with MetaDataStore.cleanup(instanceID)

* fix all the tests

* import .eslintrc from master

* autofix

* add lodash.throttle

* when re-selecting ghost files, only replace the blob, keeping progress, meta, etc

* Delete package-lock.json

* Update en_US locale

* add golden retriever support to darkmode styles

* add golden retriever to website example

* Update package-lock.json

Co-authored-by: Renée Kooi <github@kooi.me>
2021-05-12 16:30:30 +01:00
Artur Paikin
a87e8a8b80 Release 2021-05-11 23:15:55 +01:00
Mikael Finstad
135057c860
add chunkSize companion option (#2881) 2021-05-10 18:17:33 +01:00
Artur Paikin
990f67c601
Dashboard: fix individual progress by renaming camelCased svg properties (#2882)
* Rename strokeDasharray to stroke-dasharray etc, since Preact doesn’t work with those camelCased

* try adding eslint ignore for react/no-unknown-property rule
2021-05-10 18:11:03 +01:00
Artur Paikin
213c4a4de7 Merge branch 'master' of https://github.com/transloadit/uppy 2021-05-05 21:51:44 +01:00
Artur Paikin
209a0079d3 Release 2021-05-05 21:50:17 +01:00
Antoine du Hamel
a6bebda396
core: remove outdated comment (#2868)
Fixes: https://github.com/transloadit/uppy/issues/2787
2021-05-05 21:30:41 +01:00
Antoine du Hamel
a32870fe10
core: use AggregateError when available (#2869) 2021-05-04 23:35:32 +01:00
dependabot[bot]
98e7c6c08f
build(deps): bump redis from 2.8.0 to 3.1.1 (#2865)
Bumps [redis](https://github.com/NodeRedis/node-redis) from 2.8.0 to 3.1.1.
- [Release notes](https://github.com/NodeRedis/node-redis/releases)
- [Changelog](https://github.com/NodeRedis/node-redis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NodeRedis/node-redis/compare/v.2.8.0...v3.1.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-04 19:00:16 +01:00
JT
f149eb1a38
Add function as allowed prop type (#2873) 2021-05-04 17:52:05 +01:00
Jace Zhu
ab5cb3e1e9
Update index.js (#2864)
* Update index.js

This PR added companion cookies rule to every provider except Box.
https://github.com/transloadit/uppy/pull/2618

(Not sure if there's a reason Box was left out)

* Update docs for the change
2021-04-28 00:02:48 +01:00
Dominic Eden
b2e04962df
[FIX] - improve MIME type detection to solve issue in iOS Safari where the first Blob in the Array might not have a MIME type specified and so would crash the Webcam component. (#2851) 2021-04-28 00:01:59 +01:00
Artur Paikin
3253d5766e
Dashboard: Implement disableLocalFiles option — disables drag & drop, hides “browse” and “My Device” buttons (#2852)
* implement disableLocalFiles option

* don’t show dashed border if drag-drop is disabled

* Update en_US.js
2021-04-27 15:39:37 +01:00
Artur Paikin
b760b0e918
add uppy.logout() (#2850) 2021-04-27 15:37:02 +01:00
Mikael Finstad
d8d27ad1f1
Pull out metric middleware logic (#2854)
* Pull out metric middleware logic

* improve number conversion

* change logic as discussed in PR

* npm run build:locale-pack
2021-04-22 14:53:37 +02:00
Andrew
f4e99fa7bf
Base upgrades (#2856) 2021-04-19 16:20:23 +02:00
Merlijn Vos
cd3b3967da
Add preview for videos made with webcam (#2837)
* Add preview for videos made with webcam

* Update webcam and screen capture submit icon & fix prop typo

* Remove console.log

* Disable mirroring when showing recorded video

* Fix re-enable of mirroring

* Add discard button

* Don't forget to re-enable mirroring for discard button
2021-04-11 22:27:50 +01:00
Renée Kooi
7406356ecf
companion: remove stray ts-ignore comment 2021-04-06 11:54:34 +02:00
Renée Kooi
e82f828d19
companion: smaller heroku deployment (#2845) 2021-04-01 12:30:26 +02:00
Artur Paikin
6771545fe7 "access": "public" 2021-04-01 00:21:13 +01:00
Artur Paikin
1751241362 Release 2021-03-31 23:59:08 +01:00
Artur Paikin
82be5eb72a remove accidental ? devDependency 2021-03-31 18:48:48 +01:00
Renée Kooi
386cd5201b
CI better pass like this >:( 2021-03-31 18:26:42 +02:00
Artur Paikin
1fcb99540c
Add @uppy/drop-target — drag and drop files on any existing DOM element (#2836)
* Add dom-target plugin

* add dom-target to bundle and website — had trouble with css otherwise

* cleanup and dev setup

* newline at the end, restore inline: false by default

* dom-target --> drop-target, remove paste

* add docs, bundle, website example

* add types

@goto-bus-stop this should probably be something other than Uppy.PluginTarget since it won’t accept an uppy plugin?

* fix types

* Update examples/dev/Dashboard.js

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

* type string | Element

* Update packages/@uppy/drop-target/package.json

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

* Update packages/@uppy/drop-target/package.json

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

* Update examples/dev/Dashboard.js

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

* Create package-lock.json

* Update package-lock.json

* Update package-lock.json

Co-authored-by: Renée Kooi <renee@kooi.me>
2021-03-31 16:29:03 +01:00
Renée Kooi
d52bebad3a
Revert "ci: Try a much smaller Companion deployment to heroku"
This reverts commit a6d24cbae0.
2021-03-31 14:58:47 +02:00
Renée Kooi
a6d24cbae0
ci: Try a much smaller Companion deployment to heroku 2021-03-31 14:50:24 +02:00
Renée Kooi
c88e27608c
ci: fix companion deploys to docker and heroku 2021-03-31 14:18:56 +02:00
Renée Kooi
cb1a41234a
Workspaces (#2835) 2021-03-31 14:04:18 +02:00
Mikael Finstad
ceadd2e7f4
Google drive shared with me (#2758)
* Refactor list to use promises

* Include shared with me files

Fixes #2739

* revert usage of promise version of purest

it fails tests

* fix bugs

* fix lint warnings

* implement shared with me virtual dir

* pull out adaptData (it's not a public method, eslint warn)

* fix test

* disable checkbox for “shared with me”

//cc @mifi

Co-authored-by: Kevin van Zonneveld <kevin@vanzonneveld.net>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-03-31 10:12:24 +01:00
Antoine du Hamel
9e82431a16
add dynamic metaFields option (#2834)
* add dynamic metaFields option

Fixes: https://github.com/transloadit/uppy/issues/2591

* fixup! add dynamic metaFields option

* fixup! add dynamic metaFields option

* Update website/src/docs/dashboard.md

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-03-30 21:33:08 +01:00
Renée Kooi
b46be23fbe
companion: fix running on a subpath (#2841)
Co-authored-by: Niklas Salmoukas <niklas@salmoukas.com>
2021-03-29 13:48:48 +02:00
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