现代化的上传组件。 https://uppy.io/
|
пре 7 година | |
---|---|---|
assets | пре 7 година | |
bin | пре 7 година | |
examples | пре 7 година | |
src | пре 7 година | |
test | пре 7 година | |
website | пре 7 година | |
.babelrc | пре 8 година | |
.browsersync.js | пре 9 година | |
.editorconfig | пре 9 година | |
.eslintignore | пре 7 година | |
.eslintrc | пре 9 година | |
.gitignore | пре 7 година | |
.travis.yml | пре 8 година | |
ARCHITECTURE.md | пре 8 година | |
CHANGELOG.md | пре 7 година | |
CONTRIBUTING.md | пре 9 година | |
LICENSE | пре 9 година | |
Makefile | пре 8 година | |
README.md | пре 7 година | |
SERVER-PLAN.md | пре 9 година | |
UPPY-CALL.md | пре 8 година | |
env.example.sh | пре 9 година | |
package-lock.json | пре 7 година | |
package.json | пре 7 година | |
uppy-screenshot.jpg | пре 8 година |
Uppy is a sleek, modular file uploader that integrates seemlessly with any framework. It fetches files from local disk, Google Drive, Dropbox, Instagram, remote URLs, cameras and other exciting locations, and then uploads them to the final destination. It’s fast, easy to use and let's you worry about more important problems than building a file uploader. Try it live.
Uppy is developed by the Transloadit team.
Check out docs and examples on uppy.io.
$ npm install uppy
We recommend installing from NPM and then using a module bundler such as Webpack, Browserify or Rollup.js.
Add CSS uppy.min.css, either to <head>
of your HTML page or include in JS, if your bundler of choice supports it — transforms and plugins are available for Browserify and Webpack.
If you like, you can also use a pre-built bundle, for example from unpkg CDN. In that case Uppy
will attach itself to the global window.Uppy
object.
⚠️ The bundle currently consists of most Uppy plugins, so this method is not recommended for production, as your users will have to download all plugins, even if you are using just a few.
1. Add a script to the bottom of <body>
:
<script src="https://unpkg.com/uppy/dist/uppy.min.js"></script>
2. Add CSS to <head>
:
<link href="https://unpkg.com/uppy/dist/uppy.min.css" rel="stylesheet">
3. Initialize:
<script>
var uppy = Uppy.Core()
uppy.use(Uppy.DragDrop, {target: '.UppyDragDrop'})
uppy.use(Uppy.Tus10, {endpoint: '//master.tus.io/files/'})
uppy.run()
</script>
Note: we aim to support IE10+ and recent versions of Safari, Edge, Chrome, Firefox and Opera. IE6 on the chart above means we recommend setting Uppy to target a <form>
element, so when Uppy has not yet loaded or is not supported, upload still works. Even on the refrigerator browser. Or, yes, IE6.
Yep. Uppy-React component is in the works, in the meantime you can just use it as any other lib with React, see here.
Yes, whatever you want on the backend will work with XHRUpload
plugin, since it just does a POST
or PUT
request. If you want resumability, use one of tus implementations 👌🏼
No, as mentioned previously, XHRUpload
plugin is old-school and just works with everything. However, you need uppy-server
if you’d like your users to be able to pick files from Google Drive or Dropbox (more services coming). And you can add tus if you want resumability.
Yes, since 0.18, there is an S3 plugin. Check out the docs for more information.
website/src/guide/contributing.md
CHANGELOG.md