lbry-desktop/web
infinite-persistence cb6a044584
Support resume-able upload via tus (#186)
* Publish button: use spinner instead of "Publishing..."

Looks better, plus the preview could take a while sometimes.

* Refactor `doPublish`. No functional change

This is to allow `doPublish` to accept a custom payload as an input (for resuming uploads), instead of always resolving it from the redux data.

* Add doPublishResume

* Support resume-able upload via tus

## Issue
38 Handle resumable file upload

## Notes
Since we can't serialize a File object, we'll need to the user to re-select the file to resume.

* Exclude "modified date" for Firefox/Android

## Issue
It appears that the modification date of the Android file changes when selected, so that file was deemed "different" when trying to resume upload.

## Change
Exclude modification date for now. Let's assume a smart user.

* Move 'currentUploads' to 'publish' reducer

`publish` is currently rehydrated, so we can ride on that and don't need to store the `currentUploads` in `localStorage` for persistence. This would allow us to store Markdown Post data too, as `localStorage` has a 5MB limit per app.

We could have also made `webReducer` rehydrate, but in this repo, there is no need to split it to another reducer. It also makes more sense to be part of publish anyway (at least to me).

This change is mostly moving items between files, with the exception of
1. An additional REHYDRATE in the publish reducer to clean up the tusUploader.
2. Not clearing `currentUploads` in CLEAR_PUBLISH.

* Restore v1 code for livestream replay, etc.

v2 (tus) does not handle `remote_url`, so the app still needs v1 for that. Since we'll still have v1 code, use v1 for previews as well.
2021-11-10 13:16:16 -05:00
..
component Odysee specific changes and other misc improvements (#219) 2021-11-03 15:47:19 -04:00
effects app works when id api fails 2021-06-18 10:57:19 -04:00
middleware Add favicon for Google Search results (#7205) 2021-10-01 08:09:02 -04:00
page Odysee references revamp, part1 2021-10-08 15:22:07 -04:00
setup Support resume-able upload via tus (#186) 2021-11-10 13:16:16 -05:00
src Revert claim preview + fix small css issue + export named function 2021-11-10 08:21:16 +08:00
static/pwa Browser push notifications (#133) 2021-10-27 10:38:10 -04:00
stubs rename lbrytv to web 2020-05-25 17:21:02 -04:00
bundle-id.js fix uuid import with new version 2020-10-02 14:36:22 -04:00
index.js cache static files for webserver 2021-06-04 12:05:23 -04:00
lbry.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
package.json Browser push notifications (#133) 2021-10-27 10:38:10 -04:00
webpack.config.js Browser push notifications (#133) 2021-10-27 10:38:10 -04:00
webpack.sw.config.js Browser push notifications (#133) 2021-10-27 10:38:10 -04:00
yarn.lock Browser push notifications (#133) 2021-10-27 10:38:10 -04:00