|
@@ -2,17 +2,17 @@
|
|
title: "Uppy 0.23: Import from Url, refactored thumbnail generation, XHR bundle"
|
|
title: "Uppy 0.23: Import from Url, refactored thumbnail generation, XHR bundle"
|
|
date: 2018-02-12
|
|
date: 2018-02-12
|
|
author: arturi
|
|
author: arturi
|
|
-published: false
|
|
|
|
|
|
+published: true
|
|
---
|
|
---
|
|
|
|
|
|
Hi all! We are back from holidays with a shiny new `0.23.0` release for you! It’s packed with a new `Url` plugin (imports files from urls), refactored `ThumbnailGenerator`, `Webcam` improvements and more.
|
|
Hi all! We are back from holidays with a shiny new `0.23.0` release for you! It’s packed with a new `Url` plugin (imports files from urls), refactored `ThumbnailGenerator`, `Webcam` improvements and more.
|
|
|
|
|
|
## Import from Url
|
|
## Import from Url
|
|
|
|
|
|
-Meet our new “Provider” plugin, `Url`. It’s simple, but powerful: paste a link to any file on the web, and Uppy with Uppy Server will upload it wherever you need.
|
|
|
|
|
|
+Meet our new “Provider” plugin, `Url`. It’s simple, yet powerful: paste a link to any file on the web, and Uppy with Uppy Server will upload it wherever you need.
|
|
|
|
|
|
```js
|
|
```js
|
|
-uppy.use(Url, { host: YOUR_UPPY_SERVER_URL })
|
|
|
|
|
|
+uppy.use(Url, { target: Dashboard, host: YOUR_UPPY_SERVER_URL })
|
|
```
|
|
```
|
|
|
|
|
|
<figure class="wide"><video alt="Demo video showing Uppy with Url plugin that imports files from urls" controls autoplay><source src="/images/blog/0.23/uppy-url-demo.mp4" type="video/mp4">Your browser does not support the video tag, you can <a href="/images/blog/0.23/uppy-url-demo.mp4">download the video</a> to watch it.</video></figure>
|
|
<figure class="wide"><video alt="Demo video showing Uppy with Url plugin that imports files from urls" controls autoplay><source src="/images/blog/0.23/uppy-url-demo.mp4" type="video/mp4">Your browser does not support the video tag, you can <a href="/images/blog/0.23/uppy-url-demo.mp4">download the video</a> to watch it.</video></figure>
|
|
@@ -21,13 +21,15 @@ uppy.use(Url, { host: YOUR_UPPY_SERVER_URL })
|
|
|
|
|
|
## ThumbnailGenerator
|
|
## ThumbnailGenerator
|
|
|
|
|
|
-Thumbnail generation has been refactored to a separate `ThumbnailGenerator` plugin, thanks to a PR from [@richardwillars](https://github.com/richardwillars). So Uppy Core is now more lightweight for when you don’t need previews.
|
|
|
|
|
|
+Thumbnail generation has been refactored to a separate `ThumbnailGenerator` plugin, thanks to the PR from [@richardwillars](https://github.com/richardwillars). So Uppy Core is now more lightweight, if you don’t need previews.
|
|
|
|
|
|
-`ThumbnailGenerator` is still bundled with our most feature complete Dashboard plugin, so you don’t have to change anything if you were using that.
|
|
|
|
|
|
+`ThumbnailGenerator` is still bundled with our most feature complete `Dashboard` plugin though, so you don’t have to change anything if you were using that.
|
|
|
|
+
|
|
|
|
+We’ve also fixed previews in Safari and tweaked the code slightly after reading the excellent [Image resize in browsers is broken](https://blog.uploadcare.com/image-resize-in-browsers-is-broken-e38eed08df01) post by Uploadcare 👌.
|
|
|
|
|
|
## Processing results
|
|
## Processing results
|
|
|
|
|
|
-Processing results, from encoding plugins like Transloadit, are now added to `complete` event:
|
|
|
|
|
|
+Processing results from encoding plugins like [`Transloadit`](https://uppy.io/docs/transloadit/), are now added to `complete` event:
|
|
|
|
|
|
```js
|
|
```js
|
|
uppy.on('complete', (result) => {
|
|
uppy.on('complete', (result) => {
|
|
@@ -41,7 +43,7 @@ uppy.on('complete', (result) => {
|
|
})
|
|
})
|
|
```
|
|
```
|
|
|
|
|
|
-And to upload promise too:
|
|
|
|
|
|
+And to `uppy.upload()` promise result too:
|
|
|
|
|
|
```js
|
|
```js
|
|
uppy.upload().then((result) => {
|
|
uppy.upload().then((result) => {
|
|
@@ -49,7 +51,7 @@ uppy.upload().then((result) => {
|
|
})
|
|
})
|
|
```
|
|
```
|
|
|
|
|
|
-You can still use events like `transloadit:result`, its just easier when things are in the same place. Plugins can use new `uppy.addResultData()` API to add data to the `result`, like so:
|
|
|
|
|
|
+You can still use events like [`transloadit:result`](https://uppy.io/docs/transloadit/#transloadit-result), its just easier when things are in the same place. Plugins can use the new `uppy.addResultData()` API to add data to the `result`, like so:
|
|
|
|
|
|
```js
|
|
```js
|
|
uppy.addResultData(uploadID, { transloadit: assemblies })
|
|
uppy.addResultData(uploadID, { transloadit: assemblies })
|
|
@@ -57,44 +59,40 @@ uppy.addResultData(uploadID, { transloadit: assemblies })
|
|
|
|
|
|
## Webcam
|
|
## Webcam
|
|
|
|
|
|
-Webcam plugin now mirrors image previews by default, so that when you are making a selfie and wave with your right hand, you see that right hand of yours in the Webcam preview, just like in the mirror. This option can be disabled via `.use(Webcam, { mirror: false }`. Note that the resulting image will not be mirrored, so your hand will actually be waving on the left. This mimics the behaviour of smarphone selfie cameras.
|
|
|
|
|
|
+The Webcam plugin now mirrors image previews by default, so when you are making a selfie and wave with your right hand, you see that right hand in the Webcam preview, just like in the mirror. This option can be disabled via `uppy.use(Webcam, { mirror: false }`. Note that the resulting image will not be mirrored, so your hand will actually be waving on the left. This mimics the behaviour of smarphone selfie cameras.
|
|
|
|
|
|
-We’ve also added an option to select which camera will be used to capture pictures or video: [facingMode](https://uppy.io/docs/webcam/#facingMode-39-user-39) set to `user` (front camera) by default.
|
|
|
|
|
|
+We’ve also added an option to select which camera will be used to capture pictures or video: [facingMode](https://uppy.io/docs/webcam/#facingMode-39-user-39), set to `user` (front camera) by default.
|
|
|
|
|
|
## Server
|
|
## Server
|
|
|
|
|
|
-- You can now specify a config path when starting the standalone Uppy Server like so `uppy-server --config /path/to/uppyconf.json`. The config file is expected to be a json file with the same schema as the [uppy-server options](https://uppy.io/docs/server/#Options).
|
|
|
|
-- A periodic cleanup job has been added to Uppy Server, to delete stale upload files from the specified `filePath`. Even though we'd rarely expect uploaded files to go undeleted immediately, there could be cases where an error occurs during an upload, and so uppy-server leaves the file undeleted to give room for upload retries. With the cleanup job in place, we can ensure that this file would eventually be deleted after the file upload is done.
|
|
|
|
-- Responses from Multipart uploads are now relayed to Uppy Client as they are received from the upload server. With this in place, you can now handle responses from local and remote XHRUpload in nearly the same way.
|
|
|
|
|
|
+- You can now specify a config path when starting the standalone Uppy Server like so `uppy-server --config /path/to/uppyconf.json`. The config file is expected to be a JSON file with the same schema as the [Uppy Server options](https://uppy.io/docs/server/#Options).
|
|
|
|
+- A periodic cleanup job has been added to Uppy Server, to delete stale upload files from the specified `filePath`. Even though we'd rarely expect uploaded files to go undeleted immediately, there could be cases where an error occurs during an upload, and so Uppy Server leaves the file undeleted to give room for upload retries. With the cleanup job in place, we can ensure that this file would eventually be deleted after the file upload is done.
|
|
|
|
+- Responses from Multipart uploads are now relayed to Uppy Client as they are received from the target server. With this in place, you can now handle responses from local and remote XHRUpload in nearly the same way.
|
|
|
|
|
|
-## Improvements
|
|
|
|
|
|
+## Other Improvements and Additions
|
|
|
|
|
|
-- New option to hide ProgressBar and StatusBar after upload finish (#485 / @wilkoklak)
|
|
|
|
-- Chaining API has been improved, you can now use `.on` and `.off` anywhere: `uppy.use(Dashboard).use(Tus).on('complete', handleComplete).run()`.
|
|
|
|
-- We now pass response from uppy-server upload’s endpoint.
|
|
|
|
-- Transloadit plugin now has a new `transloadit:assembly-executing` event and assembly results to to the `complete` callback (#547, #527 / @goto-bus-stop).
|
|
|
|
-- We’ve added `bundle` option to `XHRUpload` plugin send multiple files in one request (#442 / @goto-bus-stop)
|
|
|
|
|
|
+- Added new option to hide ProgressBar and StatusBar after upload finish (#485 / @wilkoklak)
|
|
|
|
+- Chaining API has been improved, you can now use `.on` and `.off` anywhere: `uppy.use(Dashboard).use(Tus).on('complete', handleComplete).run()`
|
|
|
|
+- The Transloadit plugin now has a new `transloadit:assembly-executing` event and passes Assembly results to the `complete` callback (#547, #527 / @goto-bus-stop)
|
|
|
|
+- We’ve added a `bundle` option to the `XHRUpload` plugin to send multiple files in one request (#442 / @goto-bus-stop)
|
|
|
|
+- Uppy releases are now hosted on Edgly CDN by Transloadit
|
|
|
|
+- A Third-party extension for integrating the Ngrx Angular state management library with Uppy has been released, [uppy-store-ngrx](https://github.com/rimlin/uppy-store-ngrx/) by @rimlin
|
|
|
|
|
|
-## Fixes
|
|
|
|
|
|
+## Other Fixes
|
|
|
|
|
|
-- Fixed blank preview thumbnails for images in Safari; use slightly different stap scaling (#458, #584 / @arturi)
|
|
|
|
|
|
+- Fixed blank preview thumbnails for images in Safari; use slightly different step scaling (#458, #584 / @arturi)
|
|
- We now log in console and show an Informer message, not error in console, when file cannot be added due to restrictions (#604, #492 / @goto-bus-stop).
|
|
- We now log in console and show an Informer message, not error in console, when file cannot be added due to restrictions (#604, #492 / @goto-bus-stop).
|
|
-- Unused files have been removed from published package (#586 / @goto-bus-stop)
|
|
|
|
|
|
+- Unused files have been removed from published package, saving many many precious megabytes :) (#586 / @goto-bus-stop)
|
|
- Use empty input value so same file can be selected multiple times (@arturi / #534)
|
|
- Use empty input value so same file can be selected multiple times (@arturi / #534)
|
|
- Fix modal and page scroll (#564 / @arturi)
|
|
- Fix modal and page scroll (#564 / @arturi)
|
|
- Refactor provider views (#554 / @arturi)
|
|
- Refactor provider views (#554 / @arturi)
|
|
-- Lots of documentation fixes, thanks to all our contributers!
|
|
|
|
-
|
|
|
|
-## Misc
|
|
|
|
-
|
|
|
|
-- Third-party extension for integrating Ngrx Angular state management library with Uppy has been released, [uppy-store-ngrx](https://github.com/rimlin/uppy-store-ngrx/) by @rimlin.
|
|
|
|
-- Uppy releases are now hosted on Edgly CDN by Transloadit.
|
|
|
|
|
|
+- Lots of documentation fixes, thanks to all our contributors!
|
|
|
|
|
|
## Press
|
|
## Press
|
|
|
|
|
|
Uppy has made some appearances on the internet recently.
|
|
Uppy has made some appearances on the internet recently.
|
|
|
|
|
|
-**[Better File Uploads with Shrine: Direct Uploads](https://twin.github.io/better-file-uploads-with-shrine-direct-uploads)**
|
|
|
|
|
|
+1\. **[Better File Uploads with Shrine: Direct Uploads](https://twin.github.io/better-file-uploads-with-shrine-direct-uploads)**:
|
|
|
|
|
|
On how to set up Uppy with [Shrine](http://shrinerb.com/), a file attachment toolkit for Ruby applications. It starts off with an example of a plain `<form>` upload and builds up to a more advanced experience:
|
|
On how to set up Uppy with [Shrine](http://shrinerb.com/), a file attachment toolkit for Ruby applications. It starts off with an example of a plain `<form>` upload and builds up to a more advanced experience:
|
|
|
|
|
|
@@ -106,18 +104,22 @@ On how to set up Uppy with [Shrine](http://shrinerb.com/), a file attachment too
|
|
>
|
|
>
|
|
> There are many popular JavaScript file upload libraries out there – jQuery-File-Upload, Dropzone.js, FineUploader etc. – but the one you should use with Shrine is definitely Uppy 🐶. Uppy is a modular library that knows how to upload files to a custom endpoint on your app, to Amazon S3, or even to a resumable endpoint, providing progress bars, drag & drop functionality, image previews, file validations etc, all while making as few assumptions as possible.
|
|
> There are many popular JavaScript file upload libraries out there – jQuery-File-Upload, Dropzone.js, FineUploader etc. – but the one you should use with Shrine is definitely Uppy 🐶. Uppy is a modular library that knows how to upload files to a custom endpoint on your app, to Amazon S3, or even to a resumable endpoint, providing progress bars, drag & drop functionality, image previews, file validations etc, all while making as few assumptions as possible.
|
|
|
|
|
|
-**Featured [in Javascript Daily](https://twitter.com/JavaScriptDaily/status/950348390268919809)**
|
|
|
|
|
|
+2\. **Featured [in Javascript Daily](https://twitter.com/JavaScriptDaily/status/950348390268919809)**:
|
|
|
|
+> Uppy: A Powerful, Modular JavaScript File Uploader
|
|
|
|
+<cite>— JavaScript Daily</cite>
|
|
|
|
|
|
-**[Trending on GitHub](https://twitter.com/uppy_io/status/946485101541683201) accross all languages**
|
|
|
|
|
|
+3\. **[#1 Trending on GitHub](https://twitter.com/uppy_io/status/946485101541683201) accross all languages**:
|
|
|
|
+> Today our open source efforts are outpacing those of MSFT GOOG FB combined :D
|
|
|
|
+<cite>— kvz, transloadit</cite>
|
|
|
|
|
|
-**[#2 Product of the Week](https://www.producthunt.com/posts/uppy-io) on ProductHunt**
|
|
|
|
|
|
+4\. **[#2 Product of the Week](https://www.producthunt.com/posts/uppy-io) on ProductHunt**:
|
|
> You literally solved my biggest problem, thank you for developing such a great project.
|
|
> You literally solved my biggest problem, thank you for developing such a great project.
|
|
<cite>— Chetan Menaria</cite>
|
|
<cite>— Chetan Menaria</cite>
|
|
|
|
|
|
> Writing file upload functionality is always a pain in the arse. I’ll be checking this out today and integrating into SongBox if it’s good.
|
|
> Writing file upload functionality is always a pain in the arse. I’ll be checking this out today and integrating into SongBox if it’s good.
|
|
<cite>— Mick</cite>
|
|
<cite>— Mick</cite>
|
|
|
|
|
|
-**[#2 New Tool of The Year](https://stackshare.io/posts/top-developer-tools-2017) on Stackshare**
|
|
|
|
|
|
+5\. **[#2 New Tool of The Year](https://stackshare.io/posts/top-developer-tools-2017) on Stackshare**:
|
|
> Uppy closed out the year as the #1 trending GitHub JavaScript project, so we think it’s only getting started.
|
|
> Uppy closed out the year as the #1 trending GitHub JavaScript project, so we think it’s only getting started.
|
|
|
|
|
|
## Full Changelog
|
|
## Full Changelog
|