8000 GitHub - zaadevofc/img-to-url: Eazy Upload Img to Url
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

zaadevofc/img-to-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image to Url Converter

Ubah gambar menjadi url dengan instan!, gambarmu akan bisa diakses melalui url yang sudah dikonversi nantinya!

Di hosting menggunakan EzGif.

  • Ekstensi yang didukung : GIF, JPG, PNG, BMP, WebP, APNG, HEIC, FLIF, AVIF, MNG
  • Batas maksimal ukuran file : 50MB

Installation

Install with npm:

$ npm install img-to-url

With require:

const img2url = require("img-to-url");

Usage

Example :

see example.js for details.

const getUrl = async () => {
    const result = await img2url.upload('./your/path/image.png').then(x => x)
    console.log(result)
    /* Result :
    {
      ok: true,                                                         
      code: 200,
      result: {
        url: 'https://im.ezgif.com/tmp/<HASH-ID>.png',
        mime: 'image/png',
        size: 245844
      },
      HostedBy: 'https://ezgif.com',
      CreatedBy: 'https://github.com/zaadevofc'
    }
    */
}

Testing

Install dependencies:

npm install

Run tests:

npm run test

License

Code released under the MIT license.

Releases

No releases published

Packages

No packages published
0