1.1.3-b • Published 4 years ago

filebin.js v1.1.3-b

Weekly downloads
2
License
GPL-2.0
Repository
github
Last release
4 years ago

Under Development ⚠

This package is currently being worked on, don't expect everything to work as planned.

Note: Bugs as suggestions can be told in the issues tab.

We do not recommend uploading large files.

filebin.js 🗑

A javascript api for filebin.net

npm version


Example Code ✏

upload

const filebin = require("filebin.js")

filebin.upload("your file name", "the content of that file").then(promise => {

})

// If you would log 'promise', it would return:
{
    bin_url: 'https://dev.filebin.net/...', // String
    file_url: 'https://dev.filebin.net/.../...', // String
    bin_id: '...', // String
    file_size: ..., // Returns in bytes (There will not be a 'b' for bytes included.) - Integer
    expires_in: '...' // Date (year-month-dayThour:minute:second:miliseconds) - String
}

download

const filebin = require("filebin.js")

filebin.download("bin id", "file name", "path to download to").then(promise => {

})

// If you would log 'promise', it would return:
{
    path: "...", // String
    file_name: "..." // String
}

getInfo

const filebin = require("filebin.js")

filebin.getInfo('bin id').then(promise => {

})

// If you would log 'promise', it would return:
{
    bin_id: '...', // String
    bin_size_bytes: ..., // Returns in bytes (There will not be a 'b' for bytes included.) - Integer
    bin_files_size: ..., // Integer
    bin_files: [ // Array
        {
            file_name: '...', // String
            file_url: 'https://dev.filebin.net/.../...', // String
            file_size_bytes: ... // Returns in bytes (There will not be a 'b' for bytes included.) - Integer
        }
    ]
}

downloadBin

const filebin = require("filebin.js")

filebin.downloadBin('bin id', "path to download to").then(promise => {

})

// If you would log 'promise', it would return:
{
    path: "(path where it is downloaded)",
    filesDownloaded: [
        {
            file_name: '...', // String
            file_url: 'https://dev.filebin.net/.../...', // String
            file_size_bytes: ... // Returns in bytes (There will not be a 'b' for bytes included.) - Integer
        }
    ]
}

Checklist 📃

  • Upload file
  • Download file
  • Get bin info
  • Download Bin
1.1.3-b

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.1-b

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8-c

4 years ago

1.0.8-b

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6-b

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago