Commit graph

1644 commits

Author SHA1 Message Date
Antoine du Hamel
0c510ee799
add more granular image rotation control (#2838)
* add more granular image rotation control

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

* fixup! add more granular image rotation control

* fixup! add more granular image rotation control

* fixup! add more granular image rotation control

* fixup! add more granular image rotation control

* add input-range-scss dependency

* Modify the rotation slider

- Better visual styles for the slider
- Position a toggle in the center of the slider
- Make it work better on moblile
- 90° rotation: rotate counterclockwise
- 90° rotation: update icon

* Use black background for the canvas when rotating (instead of gray)

* Use smaller range for granular rotation input

* Optimize event listeners

* Fix styles and state unsyncronisation

* Update package-lock.json

Co-authored-by: Alexander Zaytsev <nqst@users.noreply.github.com>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-06-13 14:31:19 +01:00
Antoine du Hamel
4575d67f07
Translator: refactor interpolate (#2903)
* Translator: refactor interpolate

Fixes types and small code edits:
`<regex>[Symbol.split](<string>)` is equivalent to
`String.prototype.split.call(<string>, <regex>)` and potentially more
readable (the downside it's not compatible with IE, which may be why we
currently use the latter).

Refs: https://github.com/transloadit/uppy/pull/2899

* Update packages/@uppy/utils/src/Translator.js

* Revert RegExp Symbol for IE compat
2021-06-13 11:23:55 +01:00
Nilesh Suthar
7d5bdddaa6
return fileId or error in plugin.addFile (#2919)
In the case of an invalid URL, this is no proper way to handle an error. `uppy.state.info` only show the error without any info that due to which URL error was thrown. 
So returning the error or file so it can be handled as need. throwing the error will not be backward compatible
2021-06-08 13:50:31 +01:00
Merlijn Vos
f2d30420f3
Mention the file name in exceedsSize error message (#2918)
* Mention the file name in exceedsSize error message

* Fix implementation and tests

* Undo accidental commited changes
2021-06-07 15:42:41 +01:00
Antoine du Hamel
1aa17533ee
core: enrich error event for use from postproocessor (#2909)
Fixes: https://github.com/transloadit/uppy/issues/2840
2021-05-31 12:43:18 +01:00
Artur Paikin
23e4a537a6 Release 2021-05-28 11:54:17 +01:00
Artur Paikin
12b7bd34e8 Release 2021-05-27 21:35:08 +01:00
Artur Paikin
7bdaba3021
types: Add logout, Translator.translate and Translator.translateArray (#2899)
* Add logout, Translator.translate and Translator.translateArray

* Update index.d.ts

* Update index.d.ts

* Update index.js
2021-05-26 16:26:16 +01:00
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