Commit graph

1655 commits

Author SHA1 Message Date
Julian Gruber
a785f7deeb
Companion: Fix invalid referrer crashing the process 2021-07-04 20:02:10 +02:00
Artur Paikin
4b782ffbbb Release 2021-06-30 23:07:21 +01:00
Masao Kitamura
0682223f51
Only log info if debug is true (#2855)
* Only log info if debug is true

* Add option logClientVersion

defaults to true

* Update companion.md

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-06-30 12:50:51 +01:00
Andrew
8f4cc89a9e
Angular Integration (#2871)
* feature(integration): initial Angular framework implementation

* Package cleanup

* Actually add the components this time

* fix rendering bug

* Add documentation

* dependency fixes

* add broken example

* Make locales ignore angular

* dependency updates

* Update package-lock.json

* Fix broken example

* Make example consistent with docs

* angular: Update styling advice

* angular: Build system stuff

* angular: Escape dependency hell

* angular: Add dashboard-modal component

* angular: Update package.json/prepare for release

* angular: Fix styling bugs

* add Angular dependencies

* Update README.md

* lint fixes — those deps are in root

* Update README.md

Co-authored-by: Adam Medford <adammedford@gmail.com>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-06-30 11:36:57 +01:00
a-kriya
3c8fbe8d87
Add types for uppy.once method (#2965)
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
2021-06-28 09:26:04 +02:00
Antoine du Hamel
8b1b794b73
Add comments around empty setState calls (#2931) 2021-06-19 11:23:18 +01:00
Antoine du Hamel
2c996d7043
react-native: refactor takePictureWithExpo (#2946) 2021-06-17 11:53:01 +01:00
Cruaier
d0bde78ec6
#2920 fixed standalone server to initiate itself on explicit function… (#2924)
* #2920 fixed standalone server to initiate itself on explicit function call

* refactored standalone server module export

* fixed unit tests related to new companion standalone export, set the jest timeout slightly higher

Co-authored-by: Thomas Benndorf <thomas@br24.com>
2021-06-15 11:27:19 +01:00
Mikael Finstad
397f03d85d
Google drive shortcuts (#2917)
* Implement google drive shortcut support

Also add encodeURIComponent to url params
Closes #2698

* fix lint
2021-06-15 09:16:41 +01:00
Andrew
9a9860ac8f
Allowed HTML Attributes to be passed via props (#2891)
* Allowed HTML Attributes to be passed via props

This fix still needs some work, as certain attributes could be passed to Uppy or as an HTML attribute, such as target

When this is fixed, this will resolve #2403

* Removed shared attributes

I removed the ability to use certain attributes ('width', 'height', and 'target') and pass them down as Props to the div due to that fact that Uppy relies on them

* Add typescript types for the HTML attributes

* Moved common.js to getHTMLProps.js

* Fixed import

* Converted `possibleStandardNames` to an Array

* Fix import

* Fix tests
2021-06-14 13:11:37 +01:00
Merlijn Vos
33dbe58cb3
Expose drag-drop events (#2914)
* Expose drag-drop events

* we need to call DragDrop.renderArrowSvg without this, since it’s now static

* Update docs based on feedback

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-06-14 12:22:01 +01:00
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