Commit graph

1960 commits

Author SHA1 Message Date
Mikael Finstad
fc6f8f3fe5
always log errors with stack trace (#3573)
but don't do it for common error types that we ourselves produce

fixes #3495
2022-03-16 12:47:03 +07:00
Mikael Finstad
6e8d30bac1
Companion refactor (#3542)
* modernise code

* fix lint

* pull out config related functions and middleware

* fix lint in uploader
2022-03-15 11:45:04 +07:00
Antoine du Hamel
5e38c83564
@uppy/vue: enforce use of file extension within the import path (#3560) 2022-03-14 13:05:34 +01:00
Penar Musaraj
aab74a99f4
@uppy/drop-target: ignore if dropped elements aren't files (#3563)
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
2022-03-14 19:42:39 +08:00
Merlijn Vos
6573b38cc7
Abstract restriction logic in a new Restricter class (#3532)
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-03-14 17:47:57 +08:00
Robert DiMartino
974be7ce9d
@uppy/companion - Fetch all Google Drive shared drives (#3553)
* @uppy/companion - Fetch all Google Drive shared drives0

* simplify and improve

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2022-03-13 15:42:28 +07:00
Robert DiMartino
7da07c29fe
Order Google Drive results by folder to show all folders first (#3546) 2022-03-11 13:00:22 +08:00
Antoine du Hamel
50f5f910b1
@uppy/audio: refactor to ESM (#3470)
npm package is still CommonJS, the plan is to switch that in the
next semver-major.
2022-03-09 11:29:39 +01:00
Antoine du Hamel
f0ba3fbc87
@uppy/locales: compressor cleanup (#3531)
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
2022-03-09 16:16:41 +08:00
Mikael Finstad
7b7414884b
upgrade node-redis-pubsub (#3541)
fixes #3384
2022-03-08 14:20:04 +07:00
Artur Paikin
1bcb63a655
provider-view: fix breadcrumbs (#3535) 2022-03-05 23:28:25 +00:00
Sobakin Sviatoslav
55ee922f2a
Update ru_RU.js (#3529) 2022-03-03 16:10:29 +00:00
Antoine du Hamel
003d1a0a43
@uppy/companion: reorder reqToOptions (#3530)
Giving a clear separation between client-provided info and server
provided ones.

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2022-03-03 14:31:44 +01:00
github-actions[bot]
6559bea96f
Release: uppy@2.7.0 (#3525)
| Package                | Version | Package                | Version |
| ---------------------- | ------- | ---------------------- | ------- |
| @uppy/angular          |   0.3.0 | @uppy/locales          |   2.0.7 |
| @uppy/aws-s3-multipart |   2.2.1 | uppy                   |   2.7.0 |
| @uppy/companion        |   3.3.1 |                        |         |

- @uppy/companion: fix unstable test (Mikael Finstad)
- @uppy/companion: replace debug (Mikael Finstad)
- @uppy/companion: Fix COMPANION_PATH (Mikael Finstad / #3515)
- @uppy/angular: update ng version (Antoine du Hamel / #3503)
- @uppy/companion: Upload protocol "s3-multipart" does not use the chunkSize option (Gabi Ganam / #3511)
- @uppy/aws-s3-multipart: Add chunks back to prepareUploadParts, indexed by partNumber (Kevin West / #3520)
- website: Add “Stop the war” banner (Artur Paikin / #3518)
- @uppy/locales: Update zh_CN.js (linxunzyf / #3513)
- meta: update remark dependencies (Antoine du Hamel / #3502)
2022-03-02 15:26:05 +00:00
Mikael Finstad
facc2bd50c
fix unstable test
it('periodically pings') would log after jest finish
2022-03-02 20:45:15 +08:00
Mikael Finstad
267c34045a
replace debug
remove debug flag
instead add allowLocalUrls (COMPANION_ALLOW_LOCAL_URLS)
which defaults to false
this fixes https://huntr.dev/bounties/8b060cc3-2420-468e-8293-b9216620175b/

also don't allow localhost for any providers getURLMeta
2022-03-02 19:02:56 +08:00
Mikael Finstad
146d8f302d
Fix COMPANION_PATH (#3515)
* Fix COMPANION_PATH

make sure it serves everything served behind that path
fixes #3514

* add tests for subpath

* chmod +x companion.sh

* remove process.exit

as it's considered harmful in this case
an error thrown will also be printed to stderr

* add backward compatible redirect

* Apply suggestions from code review

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

* fix oops

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-03-02 17:52:59 +07:00
Antoine du Hamel
666f6acd88
@uppy/angular: update ng version (#3503)
* @uppy/angular: update ng version

* hack to allow the publish of the Angular package

* fix @types/webpack-dev-server resolution (the package is deprecated anyway)

* Add Storybook back

* Fix default value of Input

* Update README

* Apply suggestions from code review

* fix @types/react version conflict

* Update packages/@uppy/angular/.storybook/tsconfig.json
2022-03-02 11:20:38 +01:00
Gabi Ganam
db634c12a7
Upload protocol "s3-multipart" does not use the chunkSize option (#3511)
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2022-03-02 17:12:53 +07:00
Kevin West
d6ebe70f6a
Add chunks back to prepareUploadParts, indexed by partNumber (#3520) 2022-03-02 16:57:58 +07:00
linxunzyf
8beec9926e
Update zh_CN.js (#3513) 2022-02-28 12:22:50 +07:00
github-actions[bot]
b9ecd94ecd
Release: uppy@2.6.0 (#3501)
| Package         | Version | Package         | Version |
| --------------- | ------- | --------------- | ------- |
| @uppy/companion |   3.3.0 | uppy            |   2.6.0 |
| @uppy/robodog   |   2.3.2 |                 |         |

- meta: warn about not merging PR manually (Artur Paikin / #3492)
- @uppy/companion: fix unpslash author meta, sanitize metadata to strings and improve companion tests (Mikael Finstad / #3478)
- meta: ensure README is correctly formatted when doing releases (Antoine du Hamel / #3499)
- meta: fix CDN bundle (Antoine du Hamel / #3494)
- meta: fix missing EOL and end of e2e test templates (Antoine du Hamel / #3484)
- meta: use a single `.env` file for config (Antoine du Hamel / #3498)
2022-02-17 19:55:12 +00:00
Mikael Finstad
5cfb9fe7a5
fix unpslash author meta, sanitize metadata to strings and improve companion tests (#3478)
* fix broken npm run test

* improve jest / companion

add `npm run test:companion:watch`

move env variables into code to make testing easier
this allows for watching (source is causing problems with npm scripts)
also now we can run `corepack yarn test:companion -t 'single test'`

* fix root project jest

make sure we don't run companion tests on npm run test:unit (as they don't work in a browser/jsdom environment)

* improve validation logic

previously incorrect options gives an Uploader object in an incorrect state

* rewrite uploader to make it more testable

* add test for xhr

* check that metadata values are strings

* fix nested meta

causing error #3477

* convert meta to strings instead

like the official FormData spec does

* fix broken companion dev #3473

* fix botched merge

* fix botched merge and remove --fix

* fix botchedf merge

* quick fix

* .

* remove eslint fix
2022-02-17 17:43:44 +00:00
Antoine du Hamel
38174972d9
meta: fix CDN bundle (#3494) 2022-02-17 16:22:03 +01:00
github-actions[bot]
7e9f34ed30
Release: uppy@2.5.1 (#3493)
| Package                   | Version | Package                   | Version |
| ------------------------- | ------- | ------------------------- | ------- |
| @uppy/companion           |   3.2.1 | @uppy/thumbnail-generator |   2.1.1 |
| @uppy/compressor          |   0.2.2 | @uppy/robodog             |   2.3.1 |
| @uppy/onedrive            |   2.0.6 | uppy                      |   2.5.1 |

- meta: Missing comma and wrong attribute name on cors example config (Edgar Santiago / #3465)
- @uppy/onedrive: Update README.md (Márton László Attila / #3489)
- @uppy/compressor: Add image compressor plugin (Artur Paikin / #3471)
- @uppy/companion: fix periodicPingUrls oops (Mikael Finstad / #3490)
- meta: add support for ESM sources in build script (Antoine du Hamel / #3468)
2022-02-16 13:44:01 +00:00
Márton László Attila
25945b1544
Update README.md (#3489)
Change Facebook to Onderive
2022-02-16 11:41:16 +00:00
Artur Paikin
7223af2c9d
@uppy/compressor: Add image compressor plugin (#3471)
* Add Compressor plugin

* Set type in blob if it’s missing

* clear thumbnail-generator queue when cancel-all is called

* Add e2e test for @uppy/compressor

* Docs, types, readme, bundle, add event

* Update yarn.lock

* fix test

* Update e2e/cypress/integration/dashboard-compressor.spec.ts

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

* Update dashboard-compressor.spec.ts

* convert compressor to ESM

* Update e2e/clients/dashboard-compressor/index.html

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

* remove console.log

* uglierBytes

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-16 11:40:08 +00:00
Mikael Finstad
8b8e6dfc7c
fix periodicPingUrls oops (#3490)
* fix periodicPingUrls oops

closes #3488

* Update packages/@uppy/companion/src/companion.js

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

* fix syntax

* Document periodic ping

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-16 11:12:55 +00:00
Antoine du Hamel
c3340a6776
Release: uppy@2.5.0 (#3487)
| Package                   | Version | Package                   | Version |
| ------------------------- | ------- | ------------------------- | ------- |
| @uppy/companion           |   3.2.0 | @uppy/provider-views      |   2.0.7 |
| @uppy/companion-client    |   2.0.5 | @uppy/thumbnail-generator |   2.1.0 |
| @uppy/core                |   2.1.5 | @uppy/robodog             |   2.3.0 |
| @uppy/dashboard           |   2.1.4 | uppy                      |   2.5.0 |
| @uppy/locales             |   2.0.6 |                           |         |

- @uppy/companion: add support for COMPANION_UNSPLASH_SECRET (Mikael Finstad / #3463)
- @uppy/unsplash: fix nested meta (Artur Paikin / #3485)
- meta: fix(docs): typo in property `thumbnailType` (Dan Schalow / #3472)
- @uppy/robodog: add audio, box, unsplash, screen-capture to Robodog (Artur Paikin / #3483)
- meta: consolidate ENV files and fix contributing guidelines (Antoine du Hamel / #3475)
- @uppy/companion-client,@uppy/companion,@uppy/provider-views,@uppy/robodog: Finishing touches on Companion dynamic Oauth (Renée Kooi / #2802)
- meta: Improve companion docs (Mikael Finstad / #3479)
- meta: Make E2E Great Again (Merlijn Vos / #3444)
- meta: Add PostCSS handling to Vite (Artur Paikin / #3467)
- meta: Update CONTRIBUTING.md (Mikael Finstad / #3411)
- @uppy/companion: fix broken thumbnails for box and dropbox (Mikael Finstad / #3460)
- website: fix `Uppy is not defined` error (Antoine du Hamel / #3461)
- @uppy/companion: Implement periodic ping functionality (Mikael Finstad / #3246)
- @uppy/companion: fix callback urls (Mikael Finstad / #3458)
- @uppy/core,@uppy/dashboard,@uppy/thumbnail-generator: Add dashboard and UIPlugin types (Merlijn Vos / #3426)
- @uppy/locales: Add "save" to fr_FR.js (Charly Billaud / #3395)
- @uppy/companion: Fix TypeError when invalid initialization vector (Julian Gruber / #3416)
- meta: Upgrade size-limit to 7.0.5 (Artur Paikin / #3445)
- @uppy/provider-views: Unsplash: UI improvements (Artur Paikin / #3438)
- @uppy/thumbnail-generator: exifr: remove legacy IE support (Artur Paikin / #3382)
- @uppy/companion: Default to HEAD requests when the Companion looks to get meta information about a URL (Zack Bloom / #3417)
- @uppy/dashboard: check if info array is empty (Artur Paikin / #3442)
- meta: dev: fix Vite custom plugin (Antoine du Hamel / #3437)
- website: add legacy bundle to CDN example (Antoine du Hamel / #3433)
- meta: remove unused lerna and npm files (Antoine du Hamel / #3436)
- meta: replace browserify with esbuild (Antoine du Hamel / #3363)
2022-02-14 18:53:02 +00:00
Mikael Finstad
4e23e77b64
add support for COMPANION_UNSPLASH_SECRET (#3463)
was missing
2022-02-14 17:40:32 +00:00
Artur Paikin
f429f43374
@uppy/unsplash: fix nested meta (#3485)
* fix nested meta

causing error #3477

* Update packages/@uppy/provider-views/src/View.js

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

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-14 17:39:28 +00:00
Artur Paikin
f25f2b6d8a
add audio, box, unsplash, screen-capture to Robodog (#3483) 2022-02-14 17:12:11 +00:00
Renée Kooi
db47700321
Finishing touches on Companion dynamic Oauth (#2802)
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2022-02-14 11:07:52 +01:00
Merlijn Vos
6da874ed3a
meta: Make E2E Great Again (#3444)
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-08 17:37:27 +01:00
Mikael Finstad
18b23e3871
fix broken thumbnails for box and dropbox (#3460)
those are the only two providers who use companion-proxied thumbnails
dropbox had been broken after #3159
box did never work before because it just showed a placeholder (see box api)
also upgraded dropbox thumbnail api to v2
and rewrite to async/await
2022-02-02 22:12:08 +07:00
Mikael Finstad
4e827ee3f8
Implement periodic ping functionality (#3246)
* Implement periodic ping functionality

allows periodically sending a POST request to one or more URL
specified by COMPANION_PERIODIC_PING_URLS
also add nock for easier testing

* Update packages/@uppy/companion/src/companion.js

Co-authored-by: Merlijn Vos <merlijn@soverin.net>

* Update packages/@uppy/companion/src/server/jobs.js

* allow posting a JSON body

COMPANION_PERIODIC_PING_STATIC_JSON_PAYLOAD

* add todo

* remove package-lock

accidentally added during merge

* Add version and processId

by default to periodic ping when enabled

Co-authored-by: Merlijn Vos <merlijn@soverin.net>
2022-02-01 22:19:23 +07:00
Mikael Finstad
0d831b6f78
fix callback urls (#3458)
closes #3450
2022-02-01 22:17:36 +07:00
Merlijn Vos
7fdad73d6e
Add dashboard and UIPlugin types (#3426) 2022-02-01 12:57:24 +03:00
Charly Billaud
fc252250ac
Add "save" to fr_FR.js (#3395) 2022-02-01 12:23:23 +03:00
Julian Gruber
c5f8f15f65
Fix TypeError when invalid initialization vector (#3416)
This can happen for example when `encrypted` has less than 32 bytes
of hex content.
2022-02-01 12:20:41 +03:00
Artur Paikin
80e5cedf11
Unsplash: UI improvements (#3438)
* add extra dot before file size

* show search term at the top when displaying results

* add inline search to result screen

* update locale

* update locale

* remove comments

* improve semantics, remove duplicate event handlers
2022-01-26 22:34:47 +00:00
Artur Paikin
ce950f3bf3
@uppy/thumbnail-generator: exifr: remove legacy IE support (#3382)
Co-authored-by: Artur Paikin <artur@arturpaikin.com>

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-01-24 23:26:29 +00:00
Zack Bloom
72c5515355
Default to HEAD requests when the Companion looks to get meta information about a URL (#3417)
* Update the url companion to default to a HEAD request to get file meta information, falling back to a GET request on failure. Add Tus chunk size env var option.

* refactor

Keep original signature and rewrite code a bit

* add docs for COMPANION_CHUNK_SIZE

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2022-01-24 17:33:49 +07:00
Artur Paikin
cfaf2acf4e
check if info array is empty (#3442) 2022-01-20 15:14:11 +00:00
github-actions[bot]
62a1678030
Release: uppy@2.4.1 (#3432)
| Package           | Version | Package           | Version |
| ----------------- | ------- | ----------------- | ------- |
| @uppy/transloadit |   2.1.1 | uppy              |   2.4.1 |
| @uppy/robodog     |   2.2.1 |                   |         |

- @uppy/transloadit: fix handling of Tus errors and rate limiting (Antoine du Hamel / #3429)
- meta: Add Unsplash to website dashboard example (Merlijn Vos / #3431)
- meta: dev: move configuration to a `.env` file (Antoine du Hamel / #3430)
- meta: Update ci.yml (Kevin van Zonneveld / #3428)
- @uppy/transloadit: simplify `#onTusError` (Antoine du Hamel / #3419)
- meta: Force include babel numeric separator (Merlijn Vos / #3422)
2022-01-12 16:24:49 +00:00
Antoine du Hamel
cc82f33137
@uppy/transloadit: fix handling of Tus errors and rate limiting (#3429) 2022-01-12 18:24:11 +03:00
Antoine du Hamel
fdb3c5e51d
@uppy/transloadit: simplify #onTusError (#3419)
And fixes few ESLint warnings
2022-01-11 14:02:07 +01:00
github-actions[bot]
0fc3336e36
Release: uppy@2.4.0 (#3420)
| Package              | Version | Package              | Version |
| -------------------- | ------- | -------------------- | ------- |
| @uppy/drag-drop      |   2.0.6 | @uppy/tus            |   2.2.0 |
| @uppy/image-editor   |   1.1.1 | @uppy/utils          |   4.0.5 |
| @uppy/screen-capture |   2.0.6 | @uppy/robodog        |   2.2.0 |
| @uppy/transloadit    |   2.1.0 | uppy                 |   2.4.0 |

- @uppy/transloadit: ignore rate limiting errors when polling (Antoine du Hamel / #3418)
- @uppy/tus: pause all requests in response to server rate limiting (Antoine du Hamel / #3394)
- @uppy/transloadit: better defaults for rate limiting (Antoine du Hamel / #3414)
- @uppy/companion: Fix Companion deploys (kiloreux / #3388)
- meta: update aws-presigned-url example to use esm (Antoine du Hamel / #3413)
- @uppy/image-editor: namespace input range css (Merlijn Vos / #3406)
- @uppy/screen-capture: Add missing option to the screen capture types (Mustafa Navruz / #3400)
- @uppy/drag-drop: fix `undefined is not a function` TypeError (Antoine du Hamel / #3397)
- website: update december 2021 blog post (Antoine du Hamel / #3396)
- website: Polished the latest update blog (AJvanLoon / #3390)
- website: docs: fix typo in audio.md (heocoi / #3389)
- website: 2.0-2.3 post draft (Artur Paikin / #3370)
2022-01-10 19:43:52 +00:00
Antoine du Hamel
e2c62594a1
@uppy/transloadit: ignore rate limiting errors when polling (#3418)
Fixes: https://github.com/transloadit/uppy/issues/3156
2022-01-10 19:36:13 +01:00
Antoine du Hamel
a08ec4e0f7
@uppy/tus: pause all requests in response to server rate limiting (#3394)
* @uppy/tus: pause all requests in response to server rate limiting

When the remote server responds with HTTP 429, all requests are
paused for a while in the hope that it can resolve the rate limiting.
Failed requests are also now queued up after the retry delay. Before
that, they were simply scheduled which would sometimes end up
overflowing the `limit` option.

* Address review comments

* fix requests bypassing queue pause state

* Auto rate limiting

* fix `RateLimitedQueue`
2022-01-10 16:41:52 +01:00