Commit graph

54 commits

Author SHA1 Message Date
Renée Kooi
6f5de4211c
transloadit: fully disable Tus fingerprinting (#2425)
In #2239, I added a backwards compatible implementation for the `resume`
option from tus-js-client v1, but forgot to disable it again in the
Transloadit plugin.

Fixes #2382
2020-08-03 13:27:11 +02:00
mokutsu-coursera
f1ef5bd809
companion,zoom: add implementation for Zoom plugin and Zoom Provider (#2342)
* [WIP] First pass at adding zoom plugin and zoom companion service for allowing imports from zoom cloud

* WIP. Remove zoom example and move zoom companion code into core companion package, update list endpoint to retrieve based on pagination token or dates available, and get size / download endpoint working.

TO DO:
- fix logout / token expiry
- investigate why test for loading config from file is not working as expected
- confirm pagination works

* Modify provider views to allow for cases with zoom provider when insufficient results exist to enable infinite scroll (but users may need to retrieve older results), update types tests. Linters failing on the provider views files

* Update uppy and companion for the zoom integration to use folders to represent months, and retrieve 1 month at a time.

- clean up code around response data items to explicitly show fields, and match style of other provider methods
- update license date to 2020 across repo
- enable download/uploado of json timeline files
- fix companion test to load credentials from file
- remove front end code no longer required now that folders are being used instead of loading more with button

* Change initial check for user authentication to use same endpoint so we can reuse the same app permission list (ie dont require additional permissions to read user data)

* Clean up zoom provider index file, add api call back to retrieve user account information such as created timestamp and email, fix file icons, remove unused strings, remove license date updates from branch

* Add permission list to grant configurations, remove undefined response body check, update error to match style of other providers, reorder svg attribute to match other icons

* Add request to get user email address for when we are retrieving user meetings and meeting recordings within zoom provider, clean up logout api call

* Update adapter to use meeting UUID when returning the meeting id to match the meeting ID associated with the recording file meeting. This should also resolve issues around reused meeting IDs from zoom.

* Fix companion test

* uppy,robodog: do not add zoom yet

* zoom: add publishConfig

* test: remove uppy.Zoom use from typescript e2e test

Co-authored-by: Renée Kooi <renee@kooi.me>
2020-07-30 11:01:21 +01:00
Marius
541feef81e
Update tus-js-client dependency to v2 (#2239)
Co-authored-by: Renée Kooi <renee@kooi.me>
2020-06-22 12:41:45 +02:00
Artur Paikin
948a17d86f add catch and error logging 2020-06-13 02:29:19 +01:00
Artur Paikin
ef5977643a Refactor to use fetchWithNetworkError 2020-06-12 15:27:00 +01:00
Artur Paikin
5273c46a06 Add NetworkError to Transloadit plugin, including socket.io’s connect_failed 2020-05-27 09:35:21 +02:00
Renée Kooi
52f8506632
transloadit: fix property name typo (#2287)
This was causing the `ASSEMBLY_COMPLETED` Assembly statuses to be stored
under an `undefined` key, so you wouldn't actually get the final status
in the result data for the upload.
2020-05-25 13:23:12 +02:00
Renée Kooi
aeae190b8b
transloadit: only cancel assemblies belonging to ongoing upload (#2277) 2020-05-25 11:34:10 +02:00
agreene-coursera
71e83504d3
transloadit: fix progress with very different Assembly runtimes (#2143)
* FIX: if an assembly has fully completed during the upload step (because it was smaller than other files in the batch), complete it during post processing

* FIX: linter error

* TRY: creating AssemblyWatcher before connecting assembly

* REMOVE: Assembly watcher changes

* transloadit: track completed files by ID

* transloadit: fix postprocess progress bar

* transloadit: create AssemblyWatchers when restoring files

Co-authored-by: Renée Kooi <renee@kooi.me>
2020-04-01 16:40:52 +02:00
Artur Paikin
856243a149
core, transloadit: Allow new uploads when retrying; improve error handling (#1960)
* Set `allowNewUpload: true` when an error occurs to allow retryAll

* Add assembly error message and assembly_id

* Pass debug option to Robodog

* Add forceAllowNewUpload to use in retry and retryAll, improve calls to _showOrLogErrorAndThrow

* Capitalize Create Assembly message

* don’t throw error from 'upload-error' event,  improved error message structure

* handle errors better

* check if error.details exists

* Doc tweaks: added error.assembly
2020-02-11 17:06:33 +01:00
Artur Paikin
4e54483e61 core: setOptions for Core and plugins (#1728)
* Add a method to update options in Core

* Add a method to update options in Plugin (for any plugins)

* Allow re-initializing i18n locales after they’ve been updated with .setOptions

* use rest spread instead of Object.assign

* override setOptions in plugins to include i18nInit

* merge restrictions object in setOptions

* check that newOpts exists

* add spread ...

* don’t double merge

* add i18nInit to all plugins that use translation strings

* add setOptions tests to Core and Dashboard

* add setOptions docs for Core and Plugins

* fix tests for thumbnail-generator by adding plugins: {} to mock core

cause ThumbnailGenerator now calls this.setPluginState, which expects `core.state.plugins`

* also update meta with setOptions if it’s passed, change the way this.opts is set in core

@goto-bus-stop does this look ok? merging restrictions opts in core

* if locale was passed to setOptions(), call plugin.setOptions() on all plugins, so that i18n updates

* add Dashboard test that checks if locale is updated from Core via setOptions()

* Reafactor website Dashboard example to use setOptions and allow selecting a locale

🎉
2019-11-04 10:33:30 +01:00
Renée Kooi
d4097f09bf
transloadit: send Transloadit-Client header with HTTP API reque… (#1919)
* Send Transloadit-Client headers with API requests.

* Conditionally add xhr/s3 versions

* transloadit: less verbose

* fix `this`
2019-10-28 19:43:03 +01:00
Artur Paikin
6599ebdc65
transloadit: add limit option, warn about using limit when it’s set to 0 (#1789)
* add limit option to transloadit plugin to pass down to tus

* warn to set limit when uploading over 10 files

* changelog to set the default limit in 2.0

* always warn if limit === 0
2019-08-22 16:29:00 +03:00
Renée Kooi
c62ec3665d Update eslint to v6 (#1777)
* Update eslint

* Do eslint --fix

* Do not access Object.prototype method 'hasOwnProperty' from target object

* utils: add hasProperty

* eslint --fix

* Disable quote-props for locale files

* add back quotes in locale files

* revert locale files to state on master

* Update react-scripts
2019-08-13 21:45:30 +03:00
Renée Kooi
afd30a43b8
transloadit: expand on resume: false reasons 2019-07-15 11:39:44 +02:00
Renée Kooi
d60e67becd
transloadit: reduce excessive polling (#1689) 2019-07-05 14:04:04 +02:00
Artur Paikin
81a45a01ed eslint jsdoc fixes 2019-06-25 18:27:48 +03:00
Renée Kooi
e6c52f7681
Use opts.id as the plugin ID for all plugins, fixes #1674 2019-06-19 09:58:14 +02:00
Renée Kooi
b64705fce2
New sync version (#1600)
New sync version
2019-06-05 16:19:48 +02:00
Renée Kooi
a508cf7c44 core: use uploadStarted: null instead of false (#1628)
* core: use `uploadStarted: null` instead of false

Fixes #1615

* Update jest snapshots
2019-06-04 19:16:36 +03:00
Renée Kooi
980210f76c
Add VERSION properties to all plugins.
And remove the proposal-object-rest-spread plugin because it is built
into preset-env now.
2019-05-27 16:53:47 +02:00
Renée Kooi
52fb8fdc57
transloadit: Add connection error reporting (#1484)
transloadit: Add connection error reporting
2019-04-24 17:27:15 +02:00
Renée Kooi
9644df7eee
transloadit: add type: TUS_ERROR|API_ERROR|STATUS_ERROR to reports 2019-04-24 16:53:31 +02:00
Renée Kooi
5f38ece7ec
transloadit: remove ip, report full error message 2019-04-24 15:27:27 +02:00
Renée Kooi
de0a1d546b
transloadit: add opt out of error reporting 2019-04-24 14:26:53 +02:00
Renée Kooi
9448b91238
transloadit: report tus errors as well 2019-04-24 14:26:53 +02:00
Renée Kooi
a0269233a7
transloadit: add error reporting 2019-04-24 14:26:50 +02:00
Renée Kooi
890583b9b4
transloadit: add assembly status property to assembly errors 2019-04-24 13:39:51 +02:00
Artur Paikin
28fce1a137 Default locale for all plugins (#1443)
* first swing at building locale pack

* expose default locale on the plugin instance

* write a pretty en_US locale to a file, using stringify-object and template.js

* generated locale pack

* start adding a script that checks for unused locale strings

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* Update bin/build-locale-pack.js

* Console output improvements

* Also sort plugin locale keys

* Support dependencies when digging up sources

because e.g. 'emptyFolderAdded' is used in provider-views but set in Dashboard's defaultLocale

* More complex matching

So can can support cases like: `uppy.i18n(error.isAuthError ? 'companionAuthError' : 'companionError')`

* Remaining const defaultLocale -> this.defaultLocale

* Update packages/@uppy/locales/en_US.js

* Mock browser environment so all plugins can be instantiated

* Clean up output a bit

* Update bin/build-locale-pack.js

* Add all remaining plugin's locales to en_US bundle

* Update packages/@uppy/dashboard/src/index.js

* Update en_US.js

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* remove unused strings

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* Also write csv because that makes it real easy to import to friendlier places for translators /cc @arturi

* don’t set locale: this.defaultLocale — it overrides the lang pack

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* Add 'russian plural' for english, for consistency

Allows us to signal that this is possible in new target languages, and also run better linting

* Cleanup

* No longer write csv

* WIP for NL

* Create package.json

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* move locales to /src

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* ignore locales themselves

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* build minified locale packs

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* expose Uppy.locale = {} placeholder object

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* Update ru_RU.js

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* add locale bundles to example

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* Upload locales to cdn

* Allow to run tests with upload-to-cdn by setting a versionSuffix

* Move locale build to function, to make room for test()

* Bring ru_RU in sync with English

now that we've added 3 plural types across the board

* Document using locales as a consuming dev, and plugin dev

* Add linting for missing/excess locale strings

* Add the locales we had to remove to the legacy folder

and explain why they cannot make it back

* Move legacy outside of src so they are definitely not transpiled, etc

* Update packages/@uppy/locales/src/nl_NL.js

* Update website/src/docs/uppy.md
2019-04-17 13:34:23 +02:00
Artur Paikin
6881eef6f3
Merge pull request #1431 from transloadit/feature/tl-cancel
transloadit: Assembly cancellation
2019-04-16 17:17:50 +03:00
Ifedapo Olarewaju
f4e558bf94 rename serverUrl to companionUrl
and serverPattern to companionAllowedHosts
2019-04-14 13:53:50 +01:00
Renée Kooi
8f80088950
individualCancellation flag 2019-04-03 17:09:10 +02:00
Renée Kooi
659ee2ae9e
transloadit: let pipeline progress after cancellation 2019-04-03 16:08:15 +02:00
Renée Kooi
428da2bec1
transloadit: cancel Assemblies when cancelling uploads 2019-04-03 13:59:15 +02:00
Renée Kooi
ef85bc9872
transloadit: add AssemblyOptions test for fields array 2019-04-03 12:14:54 +02:00
Renée Kooi
d93ab6603f
Object rest spreads 2018-11-26 15:41:22 +01:00
Artur Paikin
92bee3fb8c
Merge pull request #1114 from transloadit/improvement/i18n-packs
Bring back locale packs
2018-10-29 20:13:25 +03:00
Renée Kooi
db49bfbec2
comment 2018-10-22 13:05:17 +02:00
Artur Paikin
5ec15c11ca update this.translator = new Translator in all plugins that use i18n
I wonder if this could somehow be done in Plugin class once
2018-10-20 12:50:34 -04:00
Renée Kooi
620e78a02c
refactor 2018-10-18 13:08:19 +02:00
Renée Kooi
9836999f5f
transloadit: Error early if neither params nor getAssemblyOptions are given. 2018-10-18 13:06:22 +02:00
Renée Kooi
1676ff82fd
transloadit: Update API key URL. 2018-10-18 13:06:22 +02:00
Renée Kooi
3c605d1ab9
transloadit: Add COMPANION_PATTERN constant. 2018-10-08 15:49:11 +02:00
Renée Kooi
d11dae4c5d
Auto configure the serverPattern when using Transloadit's hosted Companion service. 2018-10-08 15:31:31 +02:00
Renée Kooi
323c4486f9
transloadit: fix logging assembly ID 2018-09-20 16:16:03 +02:00
Renée Kooi
0590b823ef transloadit: throw and warn when using the old Uppy Server URL (#1038)
Shows up in the informer and in the console when trying to upload a file
from a remote source. Kinda sucks that you have to actually do it, but
this is the easiest place to implement it…else we have to look at other
plugins' private options and hope that users are adding the plugins in
an order that makes that possible.
2018-09-03 15:29:53 +02:00
Kevin van Zonneveld
67af833fdb
More uppy server -> companion renames (#1037)
* Some uppy server -> companion renames

* Fix typos

* Implement most of @goto-bus-stop's feedback

* Nuke Create React App readme

* An Companion -> A Companion

* Companion server -> instance
2018-09-03 14:48:03 +02:00
Renée Kooi
3b7264c376
transloadit: Use https endpoint for status fetching.
Fixes #1032
2018-09-03 11:15:11 +02:00
Renée Kooi
eb0c681455 transloadit: Only use socket.io's WebSocket transport. (#1029)
There is not much benefit to this (except saving a few HTTP requests)
but if we do this we'll see if anyone's firewalls are blocking WS or
something. Then one day in the future we can switch to plain WebSockets
instead of socket.io to shed 20KB once the Transloadit backend supports
it.
2018-08-30 22:03:36 +02:00
Renée Kooi
a4c43abd8b transloadit: Lazy load socket.io-client. (#1019) 2018-08-23 16:32:18 +02:00