#transfer #upload #curl #share #api-bindings #filepush

filepush-rs

Simple library to upload and download files to/from https://filepush.co/

4 releases

0.1.3 Oct 19, 2019
0.1.2 Oct 16, 2019
0.1.1 Oct 16, 2019
0.1.0 Oct 16, 2019

#47 in #curl

MIT/Apache

15KB
54 lines

filepush-rs

Small Rust library to upload and download files from/to filepush.co.

I forked the transfer-rs library and added download capabilities.

Usage

extern crate filepush;
use filepush::{upload, download};

fn main() {
    match upload("Cargo.toml") {
        Ok(url) => println!("{}", url),
        Err(err) => panic!("Error: {}", err),
    };
    match download("https://filepush.co/9LY9/test1") {
        Ok(url) => println!("{}", url),
        Err(err) => panic!("Error: {}", err),
    };
}

A simple CLI application is provided in the examples directory.

Building

  • Install rustc using RustUp
  • Run cargo build --release

Cli app usage from examples folder

  • git clone https://github.com/marianopw/filepush-rs
  • cd filepush-rs
  • cargo run --example cli_client -- -u yourfile
  • cargo run --example cli_client -- -d yourlink

Credit

Transfer-rs lib author is Harsh Shandilya

Dependencies

~22MB
~457K SLoC