filepush-rs

Crates.iofilepush-rs
lib.rsfilepush-rs
version0.1.3
sourcesrc
created_at2019-10-16 05:34:19.011652
updated_at2019-10-19 19:44:37.877976
descriptionSimple library to upload and download files to/from https://filepush.co/
homepage
repositoryhttps://github.com/marianopw/filepush-rs
max_upload_size
id172903
size78,403
mpw (mpwsh)

documentation

README

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

Commit count: 16

cargo fmt