Commit graph

1174 commits

Author SHA1 Message Date
Artur Paikin
41af1995c2
Dashboard: Add image and archive icons (#2027)
* Add image and archive icons

* Refactor archiveTypes
2020-01-17 17:14:20 +03:00
Renée Kooi
2b91a96c95
Release 2020-01-15 16:39:45 +01:00
Olivier Le Moign
fc5321ef24 Update french translations (#2023)
* Update fr_FR.js

Add missing keys + fix translations (French native here).

* Small revert

* Remove dangling comma
2020-01-15 15:05:51 +01:00
Renée Kooi
c63d01bf07
companion: also pass metadata to getKey for multipart S3 uploads (#2022) 2020-01-15 15:04:57 +01:00
Renée Kooi
fec7d7db3a
companion: rename S3 upload functions to clarify which type of upload they do
cc @ifedapoolarewaju
2020-01-13 12:59:00 +01:00
Renée Kooi
1463ee79ce
Improve performance of adding and removing files (#1949)
* core: add an addFiles() method that only updates state once

Previously, adding 1300-ish files took around 260ms, and looked like
this in Firefox's performance tab:

![Flamegraph](https://i.imgur.com/08veuoU.png)

All of the downward peaks are `setState()` calls and GC.

Now it takes around 60ms, and looks like this:

![Flamegraph](https://i.imgur.com/xFdwVBV.png)

Here, most of the time is spent generating file IDs and guessing file
types. Those would be areas to look at next.

* dashboard: prevent frequent state update if nothing changed

After the last commit, `addFiles()` still spends a lot of time in
`emit()` and `hideAllPanels()`. The reason is that `addFiles()` still
emits all the hundreds of file-added events, and the Dashboard responds
to each with `hideAllPanels()`, which does a state update. But this all
happens synchronously, and the state almost certainly did not change
since the last `file-added` event that fired a millisecond ago.

This adds a check to avoid the state update if it is not necessary.

![Flamegraph](https://i.imgur.com/KhuD035.png)

Adding 1300 files takes about 40ms now.

With this change, the `addFiles()` call is no longer the slowest
part—now preact rendering all the items is!

* utils: optimize generateFileID and getFileNameAndExtension

Replaces some clever things with more mundane and faster things!

Now, generateFileID is a bunch of string concatenations.
Now, getFileNameAndExtension uses `lastIndexOf()` instead of a regex.

![Flamegraph](https://i.imgur.com/ZQ1IhxI.png)

Adding 1300 files takes about 25ms.

* dashboard: use preact-virtual-list

* thumbnail-generator: add `lazy` option

* dashboard: request thumbnails once file item renders the first time

* dashboard: fork preact-virtual-list

* core: add removeFiles() to remove files in bulk

* Implement removeFile() in terms of removeFiles()

* thumbnail-generator: only queue files that can be previewed

* rename size constants to accommodate WIDTH/HEIGHT

* Use new uppy.addFiles in DragDrop and FileInput

* utils: fix getFileNameAndExtension() type

* Rip out the lazy thumbnail generation

* Rip out virtualization.

* Remove virtualization leftovers

* tell future people that this is intentionally verbose

* Update package-lock.json

* henlo i am spell

* Make `addFiles()` respect maxNumberOfFiles

* core: show an informer error if some files fail in bulk add

* locales: fix quotes to make build:locale-pack happy

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2020-01-13 12:29:08 +01:00
rtaieb
bdc8862d76 Free rate limit queue when upload times out (#2016) (#2018) 2020-01-10 13:50:18 +01:00
Artur Paikin
6642f32e4a fix vi_VN: rename en_US --> vi_VN 2020-01-07 16:54:00 +01:00
Artur Paikin
1d7a58481d ProviderViews: Improve Instagram’s “video thumbnail” 2020-01-07 16:51:16 +01:00
Renée Kooi
a7e4e12fe2
Companion dependency updates (#1983)
* companion: upgrade deps with updtr

* companion: downgrade stuff for node 6 compat

* Update packages/@uppy/companion/package.json
2020-01-06 15:24:35 +01:00
Renée Kooi
e1f25a4beb
locales: lint fix 2020-01-06 14:56:17 +01:00
Gerd R
72210adee7 Fix #2011 (#2012)
* fix #2011

The isXml() method will return false if the Content-Type header is not set in the S3 response

* aws-s3: fix lint

Co-authored-by: Renée Kooi <renee@kooi.me>
2020-01-06 14:49:56 +01:00
Pankaj Kumar
627b2e4df9 componentWillReceiveProps logic moved to componentDidUpdate (#1999) 2020-01-06 14:48:50 +01:00
thanhthot
53ef2fd862 Create vi_VN;js (#2010)
* Create vi_VN;js

* Update vi_VN.js
2020-01-06 14:27:12 +01:00
Renée Kooi
3c1a2afb09
xhr-upload: do not emit limit warning if an existing rate limit queue was passed 2020-01-06 13:24:08 +01:00
rlebosse
a6eef8c6c5 @uppy/thumbnail-generator : Fix code crashing in strict mode wi… (#1995)
* Fix code crashing in strict mode by using Number constructor

* Remove useless set of numerator and denominator
2019-12-18 16:15:54 +01:00
Corentin Ardeois
178343d264 feat(s3-multipart): add optional headers for signed url (#1985)
Update `prepareUploadPart` contract to accept an optional `headers` property in the returned value.
If `headers` are present, they will be sent along the S3 presigned URL

Fixes #1984
2019-12-16 16:07:26 +01:00
Jaedong Kim
56ceb559f5 add Korean Locale (#1986)
* add Korean Locale

* eslint --fix
2019-12-16 14:27:54 +01:00
darthf1
19e31d098b Correct Tus.TusOptions typings based on docs (#1989)
* Correct Tus.TusOptions typings based on docs

From: https://uppy.io/docs/tus/

* Update index.d.ts

* Update packages/@uppy/tus/types/index.d.ts

Co-Authored-By: Renée Kooi <renee@kooi.me>
2019-12-16 14:05:39 +01:00
Renée Kooi
18180d5778
Release 2019-12-16 12:53:23 +01:00
Ifedapo .A. Olarewaju
2194638eb4
Merge pull request #1975 from transloadit/enable-onedrive
website: enable onedrive on the website example
2019-12-13 11:24:31 +01:00
ifedapoolarewaju
7b18b17a24
Merge branch 'enable-onedrive' of github.com:transloadit/uppy into enable-onedrive 2019-12-11 16:45:06 +01:00
ifedapoolarewaju
d1cafab75b
companion: fix onedrive when viewing shared folders/files 2019-12-11 16:40:41 +01:00
Renée Kooi
4179f790e1
drag-drop/dashboard: move dropEffect assignment to dragover (#1982)
Updating `dropEffect` on `ondrop` doesn't matter, since the effect will
already have been executed at that point. It should be updated in
ondragenter/ondragover instead.

fixes #1978
2019-12-11 16:33:49 +01:00
Renée Kooi
6b006ac42c
companion: upgrade helmet 2019-12-11 13:18:24 +01:00
Renée Kooi
1afe6977af
Pass metadata to Companion getKey() option for S3 uploads (#1866)
* aws-s3: send metadata to companion

* companion: apply non-multipart s3 metadata to object

* companion: add metadata parameter to getKey() api

* docs: add `metadata` parameter for `getKey`
2019-12-09 15:05:40 +01:00
Artur Paikin
88fc5d0de1
Website: add plugin versions (#1952)
* Move stats to plugin list, add table with versions of all plugins

* Update Hexo to 4.0, and other deps too

* update hexo-filter-github-emojis dependecy, run lerna bootstrap

* re-create package-lock.json

* crap, it adds body/html to any document now, and this is a partial :(

* companion: temporary fix for ts compile error

* fix netlify maybe

* node 12 is lts

* revert attempted netlify command fix

* update package-lock.json
2019-12-09 12:46:38 +03:00
Renée Kooi
c6c72d137c
companion: use original file name in S3 Multipart uploads (#1965) 2019-12-06 17:30:54 +01:00
ifedapoolarewaju
21de0e8c67
companion: restore compressed content for onedrive domain verification 2019-12-05 10:14:17 +01:00
ifedapoolarewaju
dc980e0e1c
companion: use OneDrive validation content verbatim 2019-12-05 03:10:51 +01:00
ifedapoolarewaju
5581ad6141
companion: send content-length for oneDrive domain verification 2019-12-05 02:35:12 +01:00
ifedapoolarewaju
cace48ec72
companion: set required content type for oneDrive domain verification 2019-12-05 02:11:40 +01:00
Artur Paikin
5cfd5495ff thumbnail-generator: Add webp to the list of supported types (#1961)
* Add webp to the list of supported types

* add webp to tests too
2019-12-04 11:07:47 +01:00
Ifedapo .A. Olarewaju
81e1996dfc
Merge pull request #1951 from transloadit/mask-ref
companion: mask token from logged referrer URLs
2019-12-02 14:22:39 +01:00
Renée Kooi
701551434a
aws-s3: support GCS responses, fixes #896 (#1956)
* aws-s3: support GCS responses, fixes #896

* also check text/xml
2019-12-02 13:18:34 +01:00
ifedapoolarewaju
9c3f3dff8a
companion: oneDrive domain validation 2019-11-27 22:22:00 +01:00
Dominic Eden
e7fbaa940d [feature] - Add new ‘showRecordingLength’ option for the Webcam plugin (#1947)
* [feature] - Add new ‘showRecordingLength’ prop for the Webcam plugin. When this is true, it counts the duration of a recording and displays it to the user. Add a test for generating the correct duration of the recording.

* Update packages/@uppy/webcam/src/style.scss

Co-Authored-By: Artur Paikin <artur@arturpaikin.com>

* Added i18n for the recording length counter and update Readme. Fix Webcam styles where some styles were not in alphabetical order.

* Update packages/@uppy/webcam/src/style.scss

Co-Authored-By: Artur Paikin <artur@arturpaikin.com>

Added i18n for the recording length counter and update Readme. Fix Webcam styles where some styles were not in alphabetical order.
2019-11-27 20:10:38 +03:00
Renée Kooi
f1c208777c
dashboard: hide top bar cancel button when `hideCancelButton: t… (#1955)
Previously, only the cancel button in the status bar was hidden.

fixes https://github.com/transloadit/uppy/issues/1950
2019-11-27 14:43:17 +01:00
Ifedapo .A. Olarewaju
8954988157
Merge pull request #1953 from transloadit/test-node-6
companion: test companion on node 6 + fix incompatible code
2019-11-25 21:19:15 +01:00
ifedapoolarewaju
cc01c08eae
companion: test companion on node 6 + fix incompatible code 2019-11-23 13:04:25 +01:00
ifedapoolarewaju
a3d6e760f1
companion: use old url.parse api 2019-11-23 12:01:41 +01:00
Artur Paikin
cdc7c7ce44
Dashboard: hide note/poweredBy on short screens, improve provider list behavior (#1943)
* add uppy-size--height-md, hide note/poweredBy on short screens, refactor uppy-DashboardTabs-list

* fix unnessesary scroll bars

* naming: onFileInputChange
2019-11-21 14:03:51 +03:00
ifedapoolarewaju
a5e043dbbe
companion: mask token from logged referrer URLs 2019-11-21 11:37:56 +01:00
Mark Skelton
0d2dbbbb46 Hard code exif-js source in Uppy (#1940)
* Add exif-js source to the repo

* Remove exif-js dependency

* Clean up exif-js code

* Remove code deleting the exif thumbnail

* Add exif-js copyright info
2019-11-20 17:18:32 +01:00
Alexis Hope
9abb4e2ba7 add event type (#1923)
* add event type

* event type literal union of string

* modify ts test for custom events and emit

* core: add comment about literalunion hack
2019-11-18 14:49:10 +01:00
Alexis Hope
ad74af8b96 Test aws s3 plugin (#1934)
* begin testing aws-s3 uploader

* test getUplaodParameters

* getUploadParameters configured campanionUrl

* warn user when configured without campanionUrl

* warn if missconfigured

Co-Authored-By: Renée Kooi <renee@kooi.me>

* remove warning in constructor
2019-11-18 14:45:17 +01:00
ifedapoolarewaju
57305741e8
debug: log oauth response when access token is absent 2019-11-16 10:18:28 +01:00
ifedapoolarewaju
fcee06be71
companion: only generate uppyToken if access_token was received from provider 2019-11-16 09:31:24 +01:00
Yehuda Kremer
a61b2c1df1 Create he_IL.js (#1932)
Added hebrew translation.
2019-11-12 14:25:23 +03:00
Abdelhadi Khiati
4594415353 Change deployment to stable api 2019-11-11 15:08:17 +01:00