Commit graph

1858 commits

Author SHA1 Message Date
Antoine du Hamel
9fe02400ae meta: use workspace:^ instead of workspace:* (#3278) 2021-10-27 17:53:11 +02:00
Antoine du Hamel
70ada39c2f
meta: upgrade ESLint to v8.0.0 (#3251)
* meta: upgrade ESLint to v8.0.0

Forcing `@typescript-eslint/experimental-utils` resolution to `5.0.0` to work around the Angular linter bug. This can be removed when we move to Angular 13.

* Remove unnecessary entries from `.eslintignore`

- `private/remark-lint-uppy/index.js`: ESLiint v8 supports TLA
- `website/private_modules/hexo-renderer-uppyexamples/node_modules/**`:
  all `node_modules` folder are ignored anyway.
2021-10-25 15:53:46 +02:00
Murderlon
fb28f0189b
@uppy/unsplash@2.0.2 2021-10-21 18:38:46 +02:00
Merlijn Vos
f6f07b164a
Fix @uppy/unsplash upload (#3272)
- Fix upload by calling `Provider.initPlugin` in the `@uppy/unsplash` class
- Tweak styling for author and file size in dashboard.

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-10-21 12:10:37 +02:00
Lars Fernhomberg
8985283572
Disable drop state for non-files (#2449)
* Only handle drag events with files

* Added modification to drag-drop package as well

* Use some() instead of find() for broader browser support

* `dataTransfer.types` is not a real array in IE10

* introduce canHandleRootDrop, so we can check if dragged items are supported by some plugin

* drag-drop should check for allowNewUpload

* refactor and simplify

* expose events for Dashboard too

* move event handler call to the bottom

Co-authored-by: Renée Kooi <renee@kooi.me>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-10-20 17:01:30 +01:00
Antoine du Hamel
01d7ea13e9
meta: use Yarn v3 instead of npm (#3237)
* meta: use Yarn v3 instead of npm

* Update CONTRIBUTING.md to fix linter errors

* remove remaining npm commands

* Update deps
2021-10-20 15:16:59 +02:00
Antoine du Hamel
2eee086545
ci: test Companion with Node.js 16.x (#3273) 2021-10-20 12:05:34 +02:00
Antoine du Hamel
7cad0130dd
ci: fix tranloadit2 e2e tests (#3270)
* ci: fix tranloadit2 e2e tests

* ci: Re-enable tranloadit tests

* ci: update settings

* improve comments

* Remove cropping step from transloadit2 e2e test

* add steps back

* remove template id

* increase timeout

* transloadit2

* Re-enable all e2e tests

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-10-19 15:23:32 +01:00
tusharjkhunt
7904de7925
Add unique class to discard button (#3269)
The current discard button does not have a unique classname like the submit button. This will help in customizing the styles just for the discard button.
2021-10-18 10:45:33 +01:00
Artur Paikin
b8b4127bd5 Release 2021-10-14 21:58:29 +01:00
Artur Paikin
b632e9d8d0
Progress object is nested (#3262)
//cc @Murderlon
2021-10-14 20:26:58 +01:00
Antoine du Hamel
7ec6d8814c
@uppy/status-bar: fix calculateProcessingProgress is not a function (#3261) 2021-10-14 18:33:44 +02:00
Antoine du Hamel
55e0ffd04a
Add retext to markdown linter (#3024)
* remark-lint-uppy: use `retext` to improve doc syntax and grammar

* WIP: start fixing fixing linter errors

* Remove `retext-passive` as I don't see what's wrong with passive voice

* Remove URL plugin, add emphasis/strong marker plugin

* Fix remark settings to avoid conflicts

* WIP: more auto-fixes

* remark-simplify: allow `option`

* zoom.md

* url.md

* vue.md

* tus.md

* webcam.md

* xhrupload.md

* writing-plugins

* thumbnail-generator

* svelte

* react-dragdrop

* stores

* do not over simplify

* statusbar

* robodog

* robodog-upload

* robodog-picker

* robodog-form

* robodog-dashboard

* redux

* privacy

* uppy.md

* transloadit.md

* react-native

* react-initializing

* react-fileinput

* providers

* progressbar

* plugins

* plugin-common-options

* onedrive

* locales

* instagram

* informer

* index

* google-drive

* golden-retriever

* form

* fileinput

* facebook

* dropbox

* drop-target

* dragdrop

* remark-lint-no-unneeded-full-reference-link

* Try to setup unified-message-control

* Upgrade deps

* Fix collapsed link references with inline code

* Revert "remark-lint-no-unneeded-full-reference-link"

This reverts commit ca375f463b771bc81d0868f4d84f5979823cfc0a.

* remark-lint-uppy: add missing `"main"` field

* Update package-lock.json

* add disable comments

* fixup! xhrupload.md

* writing-plugins

* unsplash

* tus

* stores

* migration-guide

* dashboard

* community-projects

* box

* integration_help

* blog posts

* companion

* aws-s3

* aws-s3-multipart

* remark-lint-uppy README

* website/inject

* BUNDLE-README

* READMEs

* architecture

* move Remark settings to the plugin

* add `listItemIndent` setting

* list indent fix

* fix ignored files

* revert changelog changes

* fixup! architecture

* Revert changes in ignored files

* Remove unnecessary HTML tags from READMEs
2021-10-14 16:10:45 +02:00
Ahmad Issa
fb552728a4
Update ar_SA.js (#3192)
Co-authored-by: kiloreux <kiloreux@users.noreply.github.com>
2021-10-07 13:29:08 +02:00
Antoine du Hamel
1eb317ba3a Release 2021-10-06 15:55:29 +02:00
Merlijn Vos
1f8a6d66ba
Improve docs on redux store integration (#3227) 2021-10-06 15:29:22 +02:00
Antoine du Hamel
8fbabe4223
@uppy/transloadit: pass fields to transloadit (#3228)
* @uppy/transloadit: pass fields to transloadit

Co-authored-by: Merlijn Vos <Murderlon@users.noreply.github.com>
Fixes: https://github.com/transloadit/uppy/issues/3189

* inline `normalizeAssemblyOptions`

Co-authored-by: Merlijn Vos <Murderlon@users.noreply.github.com>
2021-10-06 14:25:01 +02:00
Seba Segovia
8249858cf5
added translate for missingRequiredMetafield es_ES (#3242) 2021-10-06 00:14:59 +01:00
Merlijn Vos
0ef42d1ff7
Expose @uppy/drop-target events (#3238) 2021-10-05 17:04:43 +02:00
Charles C
98401279b1
Fix AWS S3 upload on React Native (#3064)
* Fix AWS S3 upload on React Native

* Update packages/@uppy/aws-s3/src/MiniXHRUpload.js

* Update packages/@uppy/aws-s3/src/MiniXHRUpload.js

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

* Update MiniXHRUpload.js

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-10-04 14:34:05 +01:00
Merlijn Vos
3002201f38
Fix i18n error in CopyLinkButton (#3235) 2021-10-01 17:39:25 +02:00
Merlijn Vos
b7559acd7c
Make @uppy/unsplash production ready (#3196)
Co-authored-by: Alexander Zaytsev <nqst@users.noreply.github.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-10-01 16:31:58 +02:00
Merlijn Vos
e435f4a917
Retry prepareUploadParts on fail for @uppy/aws-s3-multipart (#3224)
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2021-10-01 16:31:00 +02:00
Murderlon
b34394ba56
Revert "Fix i18n error in CopyLinkButton"
This reverts commit cc81561ec6.
2021-10-01 15:28:31 +02:00
Murderlon
cc81561ec6
Fix i18n error in CopyLinkButton 2021-10-01 15:27:45 +02:00
Andrew
eea0987f90
Fix @uppy/angular component crash by loosening package.json version constraints (#3210) 2021-10-01 14:01:36 +02:00
Mikael Finstad
56a67de550
Close window on auth callback error and show error to user (#3143)
* Close window on auth callback error

Because simply receiving a "Bad request" is very bad UX
For example if the user cancels the auth flow, or doesn't give companion access
it's better to go back

* Update packages/@uppy/companion/src/server/controllers/callback.js

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

* Update packages/@uppy/companion/src/server/controllers/callback.js

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

* Update packages/@uppy/companion/src/server/controllers/callback.js

* Update callback.js

* pull out reusable code to getDynamicStateFromRequest

* Signal auth error to client

* fix test mocking

* npm run build:locale-pack

* Update packages/@uppy/companion/src/server/controllers/callback.js

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

* fix lint

* add i18n string that got lost during merge

* add french translation

* add dutch translation

* add norwegian translation

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-09-30 18:07:27 +07:00
Mikael Finstad
876f833bd1
Companion: Use GET instead of HEAD for getURLMeta + Cut off length of file names (#3048)
* rewrite to async/await

* Only fetch size (HEAD) if needed #3034

* Update packages/@uppy/companion/src/server/controllers/url.js

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

* Change HEAD to GET in getURLMeta

and abort request immediately upon response headers received
https://github.com/transloadit/uppy/issues/3034#issuecomment-908059234

* fix lint

* fix lint

* cut off length of file names

or else we get
"MetadataTooLarge: Your metadata headers exceed the maximum allowed metadata size" in tus / S3

* try to fix flaky test

* remove iife and cleanup code a bit

* fix lint by reordering code

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-09-30 17:27:13 +07:00
Mikael Finstad
f341c0f400
Include status code in HTTP error message (#3212)
Makes it easier to debug when we can see it in the log files

e.g.
```
companion: 2021-09-20T20:03:53.226Z [error] provider.onedrive.list.error ProviderApiError: Access Denied
companion: 2021-09-20T19:57:49.897Z [error] provider.onedrive.list.error ProviderApiError: Item does not exist
```
We don't know what is the error code here...
2021-09-30 16:59:48 +07:00
Mikael Finstad
12705e769f
Default allow headers (#3167)
* refactor cors middleware to avoid duplicates

* Make more ACAH headers default

Add the following headers to access-control-allow-headers by default:
Authorization, Origin, Content-Type, Accept
They are needed for basic operation. See https://github.com/transloadit/uppy/issues/3021
therefore also remove custom middlewares in examples and standalone

* Update outdated readme for S3

AWS now requires JSON instead of XML format

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

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

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

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

* fix review comments

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-09-30 16:37:23 +07:00
Mikael Finstad
1ae19a28c1
Make uploadUrls recommended (#3182)
* Make uploadUrls recommended

- warn on startup if uploadUrls is not specified as not specifying it is a security risk
- improve docs to make it more clear why uploadUrls should be specified (say that uploadUrls is required even though it is not, due to backward compatibility)
- no longer require_tld (it gives a false security) - fixes #2831

* Apply suggestions from code review

* Apply suggestions from code review

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

* remove `example: []`

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-09-30 16:31:10 +07:00
Luca Trazzi
4ff584ca24
Fix typo in @uppy/core types (#3230)
Co-authored-by: lucatrazzi <luca.trazzi@garaio.com>
2021-09-29 13:51:46 +02:00
Dani Latorre
8b8783baca
Add support for opts.headers as a function in @uppy/tus (#3221) 2021-09-29 13:51:00 +02:00
Antoine du Hamel
d69031524c
@uppy/core: move Uppy class to its own module (#3225)
* @uppy/core: move `Uppy` class to its own module

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

* Rename snapshot file

* Update docs

* Update website/src/_posts/2021-08-2.0.md

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

* Update migration guide

* Do not bundle preact with non-UI plugin packages

Co-authored-by: Merlijn Vos <merlijn@soverin.net>
2021-09-28 19:04:33 +02:00
Antoine du Hamel
46b0540e92
@uppy/image-editor: add workaround for when Cropper is loaded as ESM (#3218)
* @uppy/image-editor: add workaround for when `Cropper` is loaded as ESM

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

* Update packages/@uppy/image-editor/src/Editor.js

Co-authored-by: Kevin van Zonneveld <kevin@vanzonneveld.net>

* Add backlog entry

Co-authored-by: Kevin van Zonneveld <kevin@vanzonneveld.net>
2021-09-28 16:59:13 +02:00
Antoine du Hamel
7fd7b604d7
@uppy/react: update HTMLAttributes filter (#3215) 2021-09-28 16:58:50 +02:00
Antoine du Hamel
45325720e9
@uppy/companion: Object.fromEntries is not available on Node.js v10.x (#3209) 2021-09-28 16:58:12 +02:00
Antoine du Hamel
6b68876c68
@uppy/react: propagate prop mutation (#3208)
* @uppy/react: propagate prop mutation

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

* fixup! @uppy/react: propagate prop mutation

* fixup! @uppy/react: propagate prop mutation

* Apply changes to other Components

* Update TODOs
2021-09-28 16:57:58 +02:00
Merlijn Vos
a298e59f17
Show all details on mobile when showProgressDetails is true (#3174) 2021-09-20 15:47:28 +02:00
Antoine du Hamel
c84e218750
@uppt/xhr-upload: fix this.uppy is undefined error (#3207)
Fixes: https://github.com/transloadit/uppy/issues/3195
2021-09-20 15:45:38 +02:00
Antoine du Hamel
c33c4e43b2
@uppy/dashboard: fix linter (#3206) 2021-09-20 15:44:34 +02:00
Murderlon
b3b68c0777
Release 2021-09-20 11:51:06 +02:00
Karol Tyka
e6b474635b
Fix "attempted to use private field on non-instance" in SearchProvider (#3201) 2021-09-20 11:30:31 +02:00
Adrian Reithaug
ecd2dec9cd
Add 'done' to nb_NO.js (#3200) 2021-09-16 17:11:55 +02:00
Antoine du Hamel
b364708715
@uppy/transloadit: fix unhandledPromiseRejection failures (#3197)
* @uppy/transloadit: fix unhandledPromiseRejection failures

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

* Add transloadit2 to end2end test matrix
2021-09-16 15:24:20 +02:00
Marcelo Luiz Onhate
c7e0a5a883
fix: AbortController is not defined on Node.js (Server Side Render) (#3169)
* fix: AbortController is not defined

* use globalThis

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

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-09-13 14:55:10 +02:00
Antoine du Hamel
017c21a92c
@uppy/aws-s3-multipart: fix linter issues (#3188) 2021-09-10 15:54:07 +02:00
Murderlon
581c2f3a38
Fix eslint error in MultipartUploader 2021-09-10 13:22:12 +02:00
christianwengert
321cd8bfaf
Fix net::ERR_OUT_OF_MEMORY in @uppy/aws-s3-multipart (#3183)
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-09-10 13:13:47 +02:00
Merlijn Vos
bbb035a9df
Fix autoOpenFileEditor for @uppy/dashboard (#3186) 2021-09-10 12:38:55 +02:00