* FIX: if an assembly has fully completed during the upload step (because it was smaller than other files in the batch), complete it during post processing
* FIX: linter error
* TRY: creating AssemblyWatcher before connecting assembly
* REMOVE: Assembly watcher changes
* transloadit: track completed files by ID
* transloadit: fix postprocess progress bar
* transloadit: create AssemblyWatchers when restoring files
Co-authored-by: Renée Kooi <renee@kooi.me>
* Added possibility of specifying form field type.
* remove log statements
* Change to allow providing custom render function
* Add Types and Docs.
* Pass Uppy-styled CSS class names, so developers can leverege them when adding their custom inputs
@goto-bus-stop as we’ve discussed, what do you think?
* Fix var name
* dashboard: make typings for `render()` stricter
so people will get type errors if they try to return React elements or
raw DOM nodes.
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
Co-authored-by: Renée Kooi <renee@kooi.me>
* webcam: request a video mime type listed in `allowedFileTypes`
* webcam: stop recording when we are about to reach the max file size
* webcam: request an image mime type listed in `allowedFileTypes`
* docs: add Webcam#preferredImageMimeType
* locale: add `recordingStoppedMaxSize` string
* changelog: check webcam restrictions
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
* ProviderViews: Improve Instagram’s “video thumbnail”
* Update all provider icons to nicer round ones
* Change “drop files” copy depending on number of acquirers and Dashboard width
* Translator: support multiple components in options
When the source contains multiple placeholders for interpolation, we should ignore chunks that are not strings, because those can be JSX objects and will be otherwise incorrectly turned into strings.
Without this condition we’d get this: [object Object] hello [object Object] my <button>
* Remove unused locale strings
* Rever renderSingleInlineProvider, use Browse button instead of link, tweak styles
* Try “Browse My Device” button
* Introduce “Dark Mode“: new Dashboard option 'theme': 'light', 'dark' or 'auto'
* Refactor to also add uninstall/removeListener for the darkModeMediaQuery; remove all bindings in favor of class properties
* More dark mode styles: Providers, FileCard, tweaking focus, inputs, etc
* My Device: mobile and desktop icons
* add isMobileDevice capability, very simple detection
* More dark mode styles
* refactor
* switch back to single simple my device icon
* chrome 78 for android doesn’t support document.querySelector 👌
* nobr --> span white-space: nowrap
* Major style tweaks for mobile provider list, show dashed borders only when DnD is supported
* Add color after “import from”
just for Russian for now, because I’m thinking if this should be a part of the language string or html? @goto-bus-stop @kvz, what do you think?
* improve isMobileDevice, add tests
* don’t set the isMobileDevice capability in core for now
* add checks for typeof window !== 'undefined', otherwise fails in Node/RN
* update locales
* refactor renderDropFilesSubtitle
* Fix translations that did not respect word order
Fixes#2069
We were still using raw string concatenation in these two places. To
maintain backwards compatibility, this commit adds _new_ translations
that are substitution-based instead of concatenation-based. The old
translation is passed in as a possible substitution parameter
`backwardsCompat`, and the default (English) translations use this
parameter.
With this, if you are using a custom locale that overrides eg. the
`exceedsSize` string, Uppy will first get your `exceedsSize`
translation, and then use the default `exceedsSize2` translation which
concatenates that result and the file size. So it works the same as it
did in the past.
If a translation requires a different word order, it can override the
`exceedsSize2` translation instead.
```js
new Uppy({
locale: {
strings: {
exceedsSize2: 'Maximum file size of %{size} exceeded',
poweredBy2: '%{uppy} made this!'
}
}
})
```
In 2.0, we can remove all the old strings and only use `poweredBy2` (and
probably rename them to `poweredBy` too, heh)
* website: add missing dashboard strings to docs
* locales: remove unused second plural form from EN and NL
* build: allow different numbers of plural forms
* utils: add test for new throwing behaviour
* docs: insert PR url
* locales: revert ko_KR changes
* changelog: add 2.0 backlog entry
* locales: var → const
* docs: add brief note that translators should supply a pluralize function
* locales: update en_US with new template
* fix HEIGHT_MD = 400
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
* companion: drop parallel down/upload for S3 multipart
We were not ending the `fs-tail-stream` correctly. `fs-tail-stream` is
also not a battle-tested package and relying on file watching is never a
fun time, so it's better if we can avoid it entirely.
One good way to do that is to axe the entire parallel download/upload
feature, and instead download files in full before uploading them, like
we do for Tus and XHR :)
Fixes#1457.
* companion: add back the multiple start calls test
* companion: don't log redundant errors in production
cc @kvz
* companion: remove redundant condition
* companion: if the error is a URIError from the requested URL we only log the error message
* companion: allow providing any S3 option, closes#1388
Now you can configure any S3 option listed in
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#constructor-property.
It adds a warning about the official S3 names `accessKeyId` and
`secretAccessKey` because you should use the Companion-style names `key`
and `secret` instead.
* companion: use awsClientOptions property for Aws SDK config
* companion: also reject keys inside awsClientOptions
* should keep the checks next to each other
* companion: first check if awsClientOptions isnt null