Commit graph

9245 commits

Author SHA1 Message Date
Mikael Finstad
da45a2af2d
fix undefined protocol and example page (#4483)
fixes #4478
2023-06-08 19:20:14 +01:00
Antoine du Hamel
982cb554cc
meta: upgrade Cypress 12.9.0 -> 12.14.0 (#4491) 2023-06-07 18:27:32 +02:00
Antoine du Hamel
72f579e216
@uppy/core: remove state getter from types (#4477)
The `state` getter was removed a while back, and we forgot to fix the types.
2023-05-26 11:26:14 +02:00
neuronet77
81ba34cac2
examples/php-xhr: Added filename sanitation and file size check before saving (#4432) 2023-05-26 11:13:07 +02:00
Vasiliy Matyushin
2b855ce1a7
@uppy/xhr-upload: add support for arrays in metadata (#4431)
Currently passing an array of `File` objects renders as:

```
field_from_form_for_files[]: [object File],[object File],[object File]
``` 

and it breaks default form behaviour, with this fix it works properly, like

```
field_from_form_for_files[]: (binary)
field_from_form_for_files[]: (binary)
field_from_form_for_files[]: (binary)
```
2023-05-24 16:50:07 +02:00
stduhpf
0e3be10317
@uppy/status-bar: Filtered ETA (#4458) 2023-05-24 15:40:29 +02:00
Antoine du Hamel
f31fd9796d
@uppy/aws-s3-multipart: fix getUploadParameters option (#4465) 2023-05-24 15:08:52 +02:00
aduh95-test-account
6f3ea74301
Release: uppy@3.9.1 (#4453)
| Package           | Version | Package           | Version |
| ----------------- | ------- | ----------------- | ------- |
| @uppy/transloadit |   3.1.5 | uppy              |   3.9.1 |

- @uppy/transloadit: clean up event listener to prevent cancelled assemblies (Merlijn Vos / #4447)
2023-05-15 20:44:21 +00:00
Merlijn Vos
6e17e263f5
@uppy/transloadit: clean up event listener to prevent cancelled assemblies (#4447) 2023-05-15 15:28:39 +08:00
github-actions[bot]
aebc368c25
Release: uppy@3.9.0 (#4438)
| Package                | Version | Package                | Version |
| ---------------------- | ------- | ---------------------- | ------- |
| @uppy/aws-s3           |   3.1.1 | @uppy/status-bar       |   3.1.2 |
| @uppy/aws-s3-multipart |   3.3.0 | @uppy/transloadit      |   3.1.4 |
| @uppy/locales          |   3.2.1 | uppy                   |   3.9.0 |

- @uppy/aws-s3-multipart: allowedMetaFields: null means “include all” (Artur Paikin / #4437)
- @uppy/aws-s3-multipart: add `shouldUseMultipart ` option (Antoine du Hamel / #4205)
- @uppy/transloadit: Reset `tus` key in the file on error, so retried files are re-uploaded (Artur Paikin / #4421)
- meta: commit build file that was modified (Antoine du Hamel)
- meta: examples: add CORS settings for DigitalOcean Spaces (Antoine du Hamel / #4428)
- @uppy/aws-s3: deprecate `timeout` option (Antoine du Hamel / #4298)
- @uppy/aws-s3-multipart: make retries more robust (Antoine du Hamel / #4424)
- meta: fix badges on README (Antoine du Hamel / #4419)
2023-05-02 22:05:22 +00:00
Artur Paikin
4b2a0d734c
allowedMetaFields: null means “include all” (#4437) 2023-05-02 22:43:41 +01:00
Antoine du Hamel
8e15f27a97
@uppy/aws-s3-multipart: add shouldUseMultipart option (#4205)
* @uppy/aws-s3-multipart: add support for non-multipart uploads

* Set threshold at 100 MiB

* add `shouldUseMultipart` option

* makes the change semver-minor, the breaking change should be done in the next major

* fix merge conflict

* fix lint

* fix crash

i think it can be considered a breaking change, because i'm changing the signature of uploadPartBytes, which is an option. however I don't see uploadPartBytes documented in our docs, so maybe we can get away with a non major:

- onProgress now gets passed number of bytes instead of `ev`
- a new `size` argument (previously size was on body)

* fix shouldUseMultipart confusingness

* handle zero-size files as it was before

* remove breaking change in `uploadPartBytes`

* fix `allowedMetaFields` for non-multipart

* make backwards compatible and fix meta

* nits

* fix metadata for non-multipart

(inside multipart)

* Remove second `fileSize` argugment from shouldUseMultipart, because users can use file.size

* console.log

---------

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2023-05-02 19:34:29 +01:00
Artur Paikin
acf2c8efeb
@uppy/transloadit: Reset tus key in the file on error, so retried files are re-uploaded (#4421)
* Reset `tus` key in the file on error, so retried files are re-uploaded

* add a test

* Use one file, try to set headers

* Pass Upload-Length and Upload-Offset, so tus knows when upload is complete

* test clean up

---------

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-04-27 12:11:16 +01:00
Antoine du Hamel
f9a5e89335
meta: commit build file that was modified 2023-04-26 19:22:08 +02:00
Antoine du Hamel
125e4e1117
examples: add CORS settings for DigitalOcean Spaces (#4428) 2023-04-26 10:02:21 +02:00
Antoine du Hamel
e361267eb9
@uppy/aws-s3: deprecate timeout option (#4298) 2023-04-26 09:58:00 +02:00
Antoine du Hamel
0607fd2278
@uppy/aws-s3-multipart: make retries more robust (#4424) 2023-04-25 14:13:53 +02:00
Mikael Finstad
0e7b16a360
Revert "Refactor/dedupe cookie/session logic" (#4425)
Revert "Refactor/dedupe cookie/session logic (#4420)"

This reverts commit 354cc303ef.
2023-04-24 21:48:44 +02:00
Mikael Finstad
354cc303ef
Refactor/dedupe cookie/session logic (#4420)
* refactor/dedupe cookie logic

so that we also send sameSite for session cookies
this might fix the issue where sessions are recreated for every single request

* "fix" test

* Apply suggestions from code review

Co-authored-by: Antoine du Hamel <antoine@transloadit.com>

---------

Co-authored-by: Antoine du Hamel <antoine@transloadit.com>
2023-04-24 14:28:29 +02:00
Antoine du Hamel
fdb8293565
meta: fix badges on README (#4419) 2023-04-24 11:56:09 +01:00
github-actions[bot]
57a71e175c
Release: uppy@3.8.0 (#4418)
| Package                   | Version | Package                   | Version |
| ------------------------- | ------- | ------------------------- | ------- |
| @uppy/angular             |   0.5.2 | @uppy/progress-bar        |   3.0.2 |
| @uppy/audio               |   1.1.1 | @uppy/provider-views      |   3.3.0 |
| @uppy/aws-s3              |   3.1.0 | @uppy/react               |   3.1.2 |
| @uppy/aws-s3-multipart    |   3.2.0 | @uppy/react-native        |   0.5.1 |
| @uppy/box                 |   2.1.1 | @uppy/redux-dev-tools     |   3.0.2 |
| @uppy/companion           |   4.5.0 | @uppy/remote-sources      |   1.0.3 |
| @uppy/companion-client    |   3.1.3 | @uppy/screen-capture      |   3.1.1 |
| @uppy/compressor          |   1.0.2 | @uppy/status-bar          |   3.1.1 |
| @uppy/core                |   3.2.0 | @uppy/store-default       |   3.0.3 |
| @uppy/dashboard           |   3.4.0 | @uppy/store-redux         |   3.0.3 |
| @uppy/drag-drop           |   3.0.2 | @uppy/svelte              |   3.0.2 |
| @uppy/dropbox             |   3.1.1 | @uppy/thumbnail-generator |   3.0.3 |
| @uppy/facebook            |   3.1.1 | @uppy/transloadit         |   3.1.3 |
| @uppy/file-input          |   3.0.2 | @uppy/tus                 |   3.1.0 |
| @uppy/form                |   3.0.2 | @uppy/unsplash            |   3.2.1 |
| @uppy/golden-retriever    |   3.0.3 | @uppy/url                 |   3.3.1 |
| @uppy/google-drive        |   3.1.1 | @uppy/utils               |   5.3.0 |
| @uppy/image-editor        |   2.1.2 | @uppy/vue                 |   1.0.2 |
| @uppy/informer            |   3.0.2 | @uppy/webcam              |   3.3.1 |
| @uppy/instagram           |   3.1.1 | @uppy/xhr-upload          |   3.2.0 |
| @uppy/locales             |   3.2.0 | @uppy/zoom                |   2.1.1 |
| @uppy/onedrive            |   3.1.1 | uppy                      |   3.8.0 |

- @uppy/companion: increase max limits for remote file list operations (Mikael Finstad / #4417)
- @uppy/xhr-upload: fix type in README.md (Top Master / #4416)
- @uppy/core: improve performance of validating & uploading files (Mikael Finstad / #4402)
- @uppy/provider-views: Concurrent file listing (Mikael Finstad / #4401)
- @uppy/core,@uppy/locales,@uppy/provider-views: User feedback adding recursive folders take 2 (Mikael Finstad / #4399)
- @uppy/dashboard: Single File Mode: fix layout and make optional (Artur Paikin / #4374)
- @uppy/informer: add a check in `TransitionGroup` when component is null (Juan Belej / #4410)
- meta: Fix logos in all the readmes (Artur Paikin / #4407)
- meta: fix logo in readme (Kid / #4403)
2023-04-18 17:51:07 +00:00
Mikael Finstad
80a82756ce
@uppy/companion: increase max limits for remote file list operations (#4417)
* increase max limits for list operations

* fix broken test

* pageSize won't work until we get rid of permissions field

* Revert "fix broken test"

This reverts commit 70daa70276.

---------

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2023-04-18 18:04:05 +01:00
Top Master
96ae2bf049
@uppy/xhr-upload: fix type in README.md (#4416)
Fix README.md
2023-04-17 15:46:10 +08:00
Mikael Finstad
90f7fb9197
@uppy/core: improve performance of validating & uploading files (#4402)
* show how many files are added when loading

remake of https://github.com/transloadit/uppy/pull/4388

* add french (cherry pick)

* implement concurrent file listing

* refactor / fix lint

* refactor/reduce duplication

* pull out totals validation

don't do it for every file added, as it's very slow
instead do the check at the end when all files are added.
this allows us to easily work with 10k+ files
fixes #4389

* Update packages/@uppy/core/src/Uppy.js

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

* make restricter.validate validate everything

instead make more specific methods for sub-validation
also rename validateTotals to validateAggregateRestrictions

* improve errors and user feedback

- handle errors centrally so that we can limit the amount of toasts (informers) sent to the users (prevent flooding hundreds/thousands of them)
- introduce FileRestrictionError which is a restriction error for a specific file
- introduce isUserFacing field for RestrictionError

* fix performance issue reintroduced

* improvements

- show "%{count} additional restrictions were not fulfilled" for any restriction errors more than 4
- refactor/rename methods
- improve ghost logic/comments

* improve performance when uploading

- introduce new event "upload-start"  that can contain multiple files
- make a new patchFilesState method to allow updating more files
- unify "upload-start" logic in all plugins (send it before files start uploading)
- defer slicing buffer until we need the data
- refactor to reuse code

* fix e2e build issue

* try to upgrade cypress

maybe it fixes the error

* Revert "fix e2e build issue"

This reverts commit ff3e580c0f.

* upgrade parcel

* move mutation logic to end

* remove FileRestrictionError

merge it with RestrictionError

* fix silly bug

looks like the e2e tests are doing its job 👏

---------

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-04-15 23:50:19 +08:00
Mikael Finstad
d024eb0b52
Concurrent file listing (#4401)
* show how many files are added when loading

remake of https://github.com/transloadit/uppy/pull/4388

* add french (cherry pick)

* implement concurrent file listing
2023-04-15 23:42:46 +08:00
Mikael Finstad
465dec797d
User feedback adding recursive folders take 2 (#4399)
* show how many files are added when loading

remake of https://github.com/transloadit/uppy/pull/4388

* add french (cherry pick)

* add todo
2023-04-15 23:21:45 +08:00
Artur Paikin
cc5b0154c5
Single File Mode: fix layout and make optional (#4374)
* Only enable singleFile mode when Dashboard tall enough + add centerSingleFile option

* Shorten file name when Dashboard is short 📏

* Center and flex single file, prevent overflows, contain img instead of cover

* White image background looks better

* Fix broken file type icons (shown when no image preview)

* Don't stretch images smaller than container / background

* uppy-c-textInput font-family inherit

* No shadow, retain cover when non-single-file, add paddings

* if preview is available, set white background, otherwise keep violet

* add transparency to the white background

* centerSingleFile --> singleFileFullScreen
2023-04-13 22:06:53 +01:00
Juan Belej
f84ba514c1
@uppy/informer: add a check in TransitionGroup when component is null (#4410)
Add a check in case component is null

Co-authored-by: Juan Belej <juan.belej@classdojo.com>
2023-04-11 16:47:53 +08:00
Artur Paikin
7adacb74a7
meta: Fix logos in all the readmes (#4407)
Fix logos in all the readmes
2023-04-07 23:46:04 +01:00
Kid
e7ef5cf1b4
meta: fix logo in readme (#4403) 2023-04-06 16:00:02 +08:00
github-actions[bot]
ffabc2142e
Release: uppy@3.7.0 (#4400)
| Package                | Version | Package                | Version |
| ---------------------- | ------- | ---------------------- | ------- |
| @uppy/aws-s3           |   3.0.6 | @uppy/status-bar       |   3.1.0 |
| @uppy/aws-s3-multipart |   3.1.3 | @uppy/transloadit      |   3.1.2 |
| @uppy/companion        |   4.4.0 | @uppy/tus              |   3.0.6 |
| @uppy/companion-client |   3.1.2 | @uppy/unsplash         |   3.2.0 |
| @uppy/core             |   3.1.2 | @uppy/url              |   3.3.0 |
| @uppy/dashboard        |   3.3.2 | @uppy/utils            |   5.2.0 |
| @uppy/locales          |   3.1.0 | @uppy/xhr-upload       |   3.1.1 |
| @uppy/provider-views   |   3.2.0 | uppy                   |   3.7.0 |
| @uppy/react            |   3.1.1 |                        |         |

- @uppy/aws-s3-multipart,@uppy/aws-s3,@uppy/tus,@uppy/xhr-upload: make sure that we reset serverToken when an upload fails (Mikael Finstad / #4376)
- @uppy/aws-s3-multipart: do not auto-open sockets, clean them up on abort (Antoine du Hamel)
- @uppy/aws-s3: Update types (Minh Hieu / #4294)
- @uppy/companion-client: do not open socket more than once (Artur Paikin)
- @uppy/companion: add `service: 'companion'` to periodic ping (Mikael Finstad / #4383)
- @uppy/companion: add connection keep-alive to dropbox (Mikael Finstad / #4365)
- @uppy/companion: add missing env variable for standalone option (Mikael Finstad / #4382)
- @uppy/companion: add S3 prefix env variable (Mikael Finstad / #4320)
- @uppy/companion: allow local ips when testing (Mikael Finstad / #4328)
- @uppy/companion: fix typo in redis-emitter.js (Ikko Eltociear Ashimine / #4362)
- @uppy/companion: merge Provider/SearchProvider (Mikael Finstad / #4330)
- @uppy/companion: only body parse when needed & increased body size for s3 (Mikael Finstad / #4372)
- @uppy/core: fix bug with `setOptions` (Nguyễn bảo Trung / #4350)
- @uppy/locales: locales: add es_MX (Kevin van Zonneveld / #4393)
- @uppy/locales: locales: add hi_IN (Kevin van Zonneveld / #4391)
- @uppy/provider-views: fix race condition when adding folders (Mikael Finstad / #4384)
- @uppy/provider-views: UI: Use form attribite with a form in doc root to prevent outer form submit (Artur Paikin / #4283)
- @uppy/transloadit: fix socket error message (Artur Paikin / #4352)
- @uppy/tus: do not auto-open sockets, clean them up on abort (Antoine du Hamel)
- meta: add version info in the bundlers CI (Antoine du Hamel / #4386)
- meta: deploy to Heroku on every companion commit (Mikael Finstad / #4367)
- meta: example: migrate `redux` to ESM (Antoine du Hamel / #4158)
- meta: fix all ESLint warnings and turn them into errors (Antoine du Hamel / #4398)
- meta: fixup! website: update links to work under the new URL (Antoine du Hamel / #4371)
- meta: remove duplicate outdated OSS support docs (Mikael Finstad, Artur Paikin / #4364)
- meta: use overrides to make sure no uppy package is fetch from npm (Antoine du Hamel / #4395)
- website: add a deprecation notice and a link to the new website (Antoine du Hamel / #4370)
- website: fix home page (Antoine du Hamel)
- website: Remove the website (Merlijn Vos / #4369)
- website: update links to work under the new URL (Antoine du Hamel / #4371)
2023-04-04 23:44:16 +00:00
Antoine du Hamel
0a7eceac21
meta: fix all ESLint warnings and turn them into errors (#4398) 2023-04-04 15:54:13 +02:00
Kevin van Zonneveld
6eac99776c
locales: add es_MX (#4393) 2023-04-04 12:01:43 +01:00
Mikael Finstad
3dd1e5e68c
@uppy/provider-views: fix race condition when adding folders (#4384)
* fix race condtion when adding files

don't call addFolder from listAllFiles
because that would call addFile before all folders were loaded

also remove unused selectedFolders state

* fix also the case of adding multiple folders

* fix todo: remove SharedHandler

* remove loaderWrapper

* fix logic

* fix the last race condition

* fix broken duplicate file check

* fix logic

* prettiyfy loop

* add user feedback

so they know that something is happening

* run corepack yarn run build:locale-pack

* Revert "run corepack yarn run build:locale-pack"

This reverts commit 85548ce2fc.

* Revert "add user feedback"

This reverts commit 4060019c35.

* use async generator instead of p-map

* re-fix race-condition

* remove providerFileToId

as suggested by @arturi

* use addFiles instead of addFile

* rename function

* use provider-supplied file ID

instead of generating an ID, for providers that we whitelsit
this allows adding the same time many times (with a different path)

* call core directly

* improve dev dashboard

* disable experimental getAsFileSystemHandle

it seems to be causing problems when dropping folders with subfolders in newest chrome
e.g a folder with 50 files and a subfolder which in turn has another 50 files

also refactor and document the code more

* Update packages/@uppy/provider-views/src/ProviderView/ProviderView.jsx

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

* mov eto utils

---------

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-04-04 12:13:39 +09:00
Minh Hieu
6df62c5bc8
@uppy/aws-s3: Update types (#4294) 2023-04-03 16:19:06 +02:00
Artur Paikin
5ec7187825
@uppy/transloadit: fix socket error message (#4352)
* Fix error message being lost when emitted via socket

* Emit global error, set StatusBar to error state when there's an error, show error at the Dashboard top

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

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

* Refactor onError

* Prevent error ? button from shrinking like a weirdo

---------

Co-authored-by: Merlijn Vos <merlijn@soverin.net>
2023-04-03 12:44:23 +01:00
Antoine du Hamel
2a9b4e445a
meta: use overrides to make sure no uppy package is fetch from npm (#4395) 2023-04-02 15:00:45 +02:00
Kevin van Zonneveld
2fc0d464e4
locales: add hi_IN (#4391)
* locales: add hi_IN

* Fix linting

* Update hi_IN.js

* Update packages/@uppy/locales/src/hi_IN.js
2023-03-31 14:35:25 +01:00
Artur Paikin
f9e9702166
UI: Use form attribite with a form in doc root to prevent outer form submit (#4283)
* Use form attribite with a form in doc root to prevent outer form submit

* Fix Unsplash a11y bug — don't focus on hidden links

* Combine search and filter into one SearchFilterInput component for Unsplash

* Refactor Browser and ProviderView

* Refactor FileCard to hooks

* Finish SearchFilterInput, add reset labels and no results copy, better styles

* don't use debounce for now

* combine useEffects, named export, extract RenderMetaFields component

* inputCSSClassName --> inputClassName

* Remove typo

* 🤦

* Patch Preact to work with Jest

* tabs vs spaces

---------

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-03-30 14:04:55 +01:00
Antoine du Hamel
e6c9a4690c
meta: add version info in the bundlers CI (#4386) 2023-03-29 14:06:27 +02:00
Mikael Finstad
643fd8d055
make sure that we reset serverToken when an upload fails (#4376)
also: sync duplicated code between all plugins

fixes #4356
2023-03-29 21:06:07 +09:00
Mikael Finstad
2d1135ec56
@uppy/companion: add service: 'companion' to periodic ping (#4383)
add `service: 'companion'`

to periodic ping payload
2023-03-29 10:55:42 +09:00
Mikael Finstad
ddbbaff386
@uppy/companion: add missing env variable for standalone option (#4382)
add env variable for standalone

COMPANION_REDIS_PUBSUB_SCOPE -> redisPubSubScope
2023-03-28 21:40:35 +09:00
Nguyễn bảo Trung
376375c975
@uppy/core: fix bug with setOptions (#4350) 2023-03-28 09:16:30 +02:00
Mikael Finstad
596989d6eb
@uppy/companion: merge Provider/SearchProvider (#4330)
* merge search provider and provider

closes #4308

* simplify and improve naming

* Apply suggestions from code review

* fix test

need to have an authProvider for a grantConfig to be set
previously we didn't care, so this test was a bit wrong

* Update packages/@uppy/companion/src/server/provider/Provider.js

* fix merge oops
2023-03-28 15:23:58 +09:00
Mikael Finstad
255e71546f
@uppy/companion: only body parse when needed & increased body size for s3 (#4372)
* refine body parsers

to make it possible to adjust them individually
also improves security and speed
because we don't have to parse all body types (and all sizes) for all endpoints

* increase body size for s3 complete endpoint

fixes #1945
2023-03-28 15:02:18 +09:00
Antoine du Hamel
3c5626f4ca
example: migrate redux to ESM (#4158)
Co-authored-by: Murderlon <merlijn@soverin.net>
2023-03-23 22:41:30 +01:00
Merlijn Vos
6430a00aa9
Remove the website (#4369) 2023-03-24 00:33:46 +08:00
Antoine du Hamel
806b98e55b
fixup! website: fix home page 2023-03-23 16:44:21 +01:00
Antoine du Hamel
ba3c853af0
website: fix home page 2023-03-23 16:38:54 +01:00