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)
```
* @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>
* 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>
* 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>
* 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>
* 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>
* 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
| 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)
* 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>
* 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>
* 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>
* 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
* 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