Commit graph

1183 commits

Author SHA1 Message Date
Ifedapo .A. Olarewaju
a8917d5062
Merge pull request #2047 from transloadit/put-remote-xhr
companion,xhr-upload: add option to set http method for remote multipart uploads
2020-02-03 12:49:16 +01:00
Artur Paikin
d385d2c84e
Clear state error after the last file is removed (#2041) 2020-02-03 13:07:47 +03:00
ifedapoolarewaju
4ed7508f78
companion,xhr-upload: option to set multipart http method
fixes #2019 (we can all go one year backwards once this is merged)
2020-01-31 15:51:15 +01:00
ifedapoolarewaju
83ec63efb2
providers: remove redundant use of options 2020-01-31 14:54:13 +01:00
ifedapoolarewaju
d34a67f9fd
add todo 2020-01-31 12:13:58 +01:00
Michael Kabatek
ff5714ebc3 fix: remove conditonal to replace google with drive
* Google drive callback url now uses 'google' and not 'drive'
* Fixes callback url by removing the conditional for google providerName
2020-01-31 02:06:01 -07:00
Artur Paikin
1ea950d5d2
core: Always log errors (#2029)
* Show errors in logs always. nullLogger --> justErrorsLogger

Reasoning: too often we ended up showing errors in the Informer bubble, but not in the console, which is wrong and annoying. Devs still have an option to silence logs or direct them elsewhere by setting a custom logger

* Hide pause/resume buttons when error occures

* Update tests

* Update website/src/docs/uppy.md

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

Co-authored-by: Renée Kooi <renee@kooi.me>
2020-01-28 18:45:23 +03:00
Eduardo Flores
285ac9a9d0 Changed aria-level attribute to correct syntax. (#2032)
* Changed aria-level attribute to correct syntax.

Changed the aria-level attribute to the correct syntax. Changes were also made to meet ADA compliance.

* update a few more aria-level attributes

Co-authored-by: Renée Kooi <renee@kooi.me>
2020-01-22 13:06:53 +01:00
yoann-hellopret
0640a1a56a remove encodeURIComponent to avoid encoding characters twice (#2033) 2020-01-22 12:39:52 +01:00
Ifedapo .A. Olarewaju
15cd6fd781
Merge pull request #2034 from transloadit/fix-onedrive
companion,website: make encryption shorter + enable onedrive on website
2020-01-22 12:36:18 +01:00
Ifedapo .A. Olarewaju
cb75538fcd
Merge pull request #1966 from transloadit/instagram-graph
companion: support new Instagram Graph API
2020-01-21 13:45:36 +01:00
ifedapoolarewaju
61edba36b3
companion,website: make encryption shorter + enable onedrive on website example 2020-01-21 13:14:17 +01:00
ifedapoolarewaju
a54274f645
debug: make tests pass 2020-01-20 15:10:37 +01:00
ifedapoolarewaju
aeb3d12d7f
debug: fix base64 escaping 2020-01-20 14:25:23 +01:00
ifedapoolarewaju
4b4ff2eccd
Merge branch 'master' of github.com:transloadit/uppy 2020-01-20 13:42:53 +01:00
ifedapoolarewaju
1971117ee3
debug: encode companion auth token as base64 2020-01-20 13:40:48 +01:00
Artur Paikin
7eda2346a8
core: setState(modifiedFiles) in onBeforeUpload (#2028)
* Updating files in state, too, because uploader plugins receive file IDs only, not actual files

* Update doc examples with simpler spread syntax
2020-01-20 15:33:38 +03:00
ifedapoolarewaju
0b4c22dddb
Revert "debug: see if excluding cookies for onedrive fixes large header issue"
This reverts commit c6fbae5a9d.
2020-01-19 23:02:27 +01:00
ifedapoolarewaju
c6fbae5a9d
debug: see if excluding cookies for onedrive fixes large header issue 2020-01-19 22:32:36 +01:00
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
Renée Kooi
2b7df61111
Merge branch 'master' into instagram-graph 2020-01-08 14:39:06 +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
b9aab9dea9
companion: use updated grant js version for instagram graph 2019-12-12 00:54:02 +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