Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dckt/remote-downloader
Download files from anywhere 😎
https://github.com/dckt/remote-downloader
download firebase reasonml
Last synced: 30 days ago
JSON representation
Download files from anywhere 😎
- Host: GitHub
- URL: https://github.com/dckt/remote-downloader
- Owner: DCKT
- License: mit
- Created: 2018-03-23T18:14:12.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T01:21:55.000Z (about 2 years ago)
- Last Synced: 2023-03-24T13:13:22.385Z (almost 2 years ago)
- Topics: download, firebase, reasonml
- Language: Reason
- Size: 4.72 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# REMOTE DOWNLOADER
Download files from anywhere 😎
## Setup
There is a `README` for each project, take a look !## How it works
This project uses Firebase to avoid database, hosting and some painful server management.
This project is split into 2 projects :
* **server** : listen Firebase Database update and trigger actionn
* **client** : web interface to add and remove database elements### Lifecycle
1. The client create a new **file ref** with some params
```
{
"id": ,
"url": ,
"extract": ,
"progress": 0,
"size": 0,
"status": "waiting"
}
```2. The server listen the `child_added` event and will trigger the download if the `status` of the added file is `waiting`.
3. On the `request` stream event :
* Update the `size` data (total size of the file in octet).
* Change the `status` to `pending`.
* Add the `filename`4. On each `data` stream event, we update the download `progress` (in octet).
Note : Obviously, there is a `throttle` bound to the event to avoid data consumption.5. On `end` stream event :
* Change the `status` to `completed`
6. When the download is finished, we update the `filepath`.