Skip to content

Commit

Permalink
Updated the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
CA1R7 committed Dec 1, 2021
1 parent 6263fb1 commit e4cc154
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# node-annonfiles
Annonfiles unofficial API for uploading and downloading files.

Annonfiles is unofficial API for uploading and downloading files.

# Installation

Install the package globally for use it anywhere easier
if you are using `NPM` :

```
npm install node-annonfiles
```

or `YARN` :

```
npm install -g node-annonfiles
yarn add node-annonfiles
```

# Usage
Expand All @@ -17,7 +24,7 @@ const { upload, getInfo, download } = require("node-annonfiles");
(async () => {
try {
// If you have not keyAcess let it empty
const uploadFile = await upload("./file.txt", { token: "PUT_KEYACCESS" });
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) {
Expand All @@ -34,7 +41,7 @@ const { upload, getInfo, download } = require("node-annonfiles");
node-annonfiles --upload file.txt
```

with keyaccess original of <a href="https://anonfiles.com/docs/api">Annonfiles website</a>
with keyaccess original from <a href="https://anonfiles.com/docs/api">Annonfiles website</a>

```
node-annonfiles --upload file.txt@{keyaccess}
Expand Down Expand Up @@ -71,10 +78,20 @@ Wait for uploading file.txt

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

```
Expand Down

0 comments on commit e4cc154

Please sign in to comment.