uppy/packages/@uppy/core
Artur Paikin ed8a494875
Mark network errors as NetworkError (#2110)
* Add NetworkError error type and isNetworkError utility check

* Detect network errors in tus and xhr-upload

Co-Authored-By: Ifedapo .A. Olarewaju <ifedapoolarewaju@gmail.com>

* add NetworkError check to RequestClient in companion-client

* return false if !xhr 🙈

* move catch so that only errors from _checkMinNumberOfFiles are caught — errors from uploads are logged in `upload-error` already

//cc @goto-bus-stop

* Add NetworkError to MiniXHRUpload in aws-s3

//cc @goto-bus-stop

* Add tests

//cc @ifedapoolarewaju

* pass xhr to NetworkError

* add logging in catch of uppy.upload()

* start error message with “This looks like a network error”

* originalRequest --> request, return NetworkError right away

* check for NetworkError in `delete` as well

do we need it in preflight too, @ifedapoolarewaju?

* remove redundant error message re-declaration

* _showOrLogErrorAndThrow, but don’t showInformer

Co-authored-by: Ifedapo .A. Olarewaju <ifedapoolarewaju@gmail.com>
2020-04-21 10:36:49 +02:00
..
src Mark network errors as NetworkError (#2110) 2020-04-21 10:36:49 +02:00
types core: add typings for setOptions(). (#2135) 2020-03-16 14:11:56 +01:00
LICENSE Move Core class to @uppy/core package. 2018-06-14 16:31:19 +02:00
package-lock.json Release 2020-04-15 20:07:42 +01:00
package.json Release 2020-04-15 20:07:42 +01:00
README.md docs: update webpack homepage URLs 2019-03-04 13:43:37 +01:00

@uppy/core

Uppy logo: a superman puppy in a pink suit

Build Status

Uppy is a sleek, modular JavaScript file uploader that integrates seamlessly with any application. Its fast, easy to use and lets you worry about more important problems than building a file uploader.

  • Fetch files from local disk, remote urls, Google Drive, Dropbox, Instagram, or snap and record selfies with a camera;
  • Preview and edit metadata with a nice interface;
  • Upload to the final destination, optionally process/encode

Read the docs | Try Uppy

Uppy is being developed by the folks at Transloadit, a versatile file encoding service.

Example

const Uppy = require('@uppy/core')

const uppy = Uppy()
uppy.use(SomePlugin)

Installation

$ npm install @uppy/core --save

We recommend installing from npm and then using a module bundler such as Webpack, Browserify or Rollup.js.

Alternatively, you can also use this plugin in a pre-built bundle from Transloadit's CDN: Edgly. In that case Uppy will attach itself to the global window.Uppy object. See the main Uppy documentation for instructions.

Documentation

Documentation for this plugin can be found on the Uppy website.

License

The MIT License.