Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

node-annonfiles

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-annonfiles

Annonfiles is an unofficial API for uploading files also downloading.

latest
Source
npmnpm
Version
2.0.7
Version published
Maintainers
1
Created
Source

node-annonfiles

Annonfiles is unofficial API for uploading and downloading files.

Installation

if you are using NPM :

npm install node-annonfiles

or YARN :

yarn add node-annonfiles

Usage

const { upload, getInfo, download } = require("node-annonfiles");

(async () => {
  try {
    // If you have not keyAcess let it empty
    const uploadFile = await upload("./file.txt", { key: "PUT_KEYACCESS" });
    console.log(uploadFile); // you will get same result on the top
    // functions download,getInfo = (id: string) => result json
  } catch (e) {
    console.log(e);
  }
})();

CLI

Upload files

node-annonfiles --upload file.txt

with keyaccess original from Annonfiles website

node-annonfiles --upload file.txt@{keyaccess}

Output

Wait for uploading file.txt
{
    "status": true,
    "data": {
        "file": {
            "url": {
                "full": "https://anonfiles.com/D9KbB411u2/file_txt",
                "short": "https://anonfiles.com/D9KbB411u2"
            },
            "metadata": {
                "id": "D9KbB411u2",
                "name": "file.txt",
                "size": {
                    "bytes": 5,
                    "readable": "5 B"
                }
            }
        }
    }
}
  • Make sure store the ID of any output for use it to get the direct download link.

Download files

You should use ID of the file you already uploaded it, I used D9KbB411u2 just for an example.

NOTE: you should use proxy for passing cloudflare detector.

Normal usage :

node-annonfiles --download D9KbB411u2

With proxy usage :

node-annonfiles --download D9KbB411u2@proxy

Output

Fetching direct link...
https://cdn-140.anonfiles.com/D9KbB411u2/d0db8fb0-1623874914/file.txt

Get Info Files

Use ID for get the info of files.

node-annonfiles --get D9KbB411u2

Output

Fetching File Metadata...
{
  "url": {
    "short": "https://anonfiles.com/D9KbB411u2",
    "full": "https://anonfiles.com/D9KbB411u2/file_txt"
  },
  "metadata": {
    "size": { "bytes": 5, "readable": "5 B" },
    "name": "file_txt",
    "id": "D9KbB411u2"
  }
}

License

Copyright (c) 2021 CA1R71 Licensed under the Apcahe 2.0 license.

Keywords

annonfiles

FAQs

Package last updated on 01 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts