Skip to content
This repository was archived by the owner on Jan 16, 2023. It is now read-only.

Latest commit

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

capella.nodejs

Image uploader to Capella

Installation

npm install @codexteam/capella-pics --save

Usage

constCapella=require('@codexteam/capella-pics');letcapella=newCapella();// upload by URLcapella.uploadFileByURL('https://capella.pics/public/app/capella-logo.png',function(resp){console.log(resp);});// upload from local pathcapella.uploadFile('C:/Users/Capella/Desktop/capella-logo.png',function(resp){console.log(resp);});

Response

Return Capella response object if everything is ok, otherwise returns Error message.

Response format

Callback argument description

On error

{
"success": false,
"message": <message>
}

On success

{
"success": true,
"message": <message>,
"id": <id>,
"url": <url>
}

Custom endpoint

You can pass a custom endpoint address to the constructor.

let capella = new Capella({
endpoint: 'https://capella.pics/upload'
});

License

MIT

About

Capella SDK for Node.js

Resources

Stars

4 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages