Skip to content

gaurav0107/FileDownloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileDownloader

File Downloader that can download data from multiple sources and protocols to local disk.

Description

The project downloads files using protocols(http, https, ftp, sftp) to a configurable location. This is structured such that, it can be easily extended to support another protocols.

User Interface

This project solely does not provide and User Interface as only Http API's has been exposed, Api Docs.

To get an User Interface this project can be clubbed with a React App which has been designed to use API's exposed by This project.

These two has been kept separate to not enforce use of any specific User Interface.

Design

TODO

Getting Started

Prerequisites

For building and running the application you need:

Installation

Clone the repository:

git clone git://github.com/gaurav0107/FileDownloader.git
cd FileDownloader

If this is your first time using Github, review http://help.github.com to learn the basics.

Run Tests:

Complete Test Suite
mvn test
Validation Tests:
mvn test -Dtest=validationTest

Run Application

Using Spring Boot:

mvn spring-boot:run

Demo

Api Docs

Postman Docs

Initiate Download Request

POST /api/v1/downloadRequest

curl --location --request POST "https://gdfiledownloader.herokuapp.com/api/v1/downloadRequest" \
  --header "Content-Type: application/json" \
  --data "{
    \"downloadFiles\": [
        \"http://www.africau.edu/images/default/sample.pdf\",
        \"sftp://test.rebex.net/readme.txt?user=demo&pass=password\",
        \"ftp://test.rebex.net/readme.txt?user=demo&pass=password\"
    ]
}"

GET /api/v1/downloadRequest

GET /api/v1/downloadRequest

curl --location --request GET "https://gdfiledownloader.herokuapp.com/api/v1/downloadRequest"
GET /api/v1/downloadRequest/{requestId}


curl --location --request GET "https://gdfiledownloader.herokuapp.com/api/v1/downloadRequest/ce9b4336-ee74-4a45-9720-70ecdef07e00"

Sample URLS:

http://www.africau.edu/images/default/sample.pdf
sftp://test.rebex.net/readme.txt?user=demo&pass=password
ftp://test.rebex.net/readme.txt?user=demo&pass=password

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages