url-to-file
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

url-to-file

CI/CD npm version semantic-release

A utility to convert url to file.

Install

Install via npm or yarn.

npm i -D url-to-file
yarn add url-to-file

API

fetchFile

Fetch an url and return a File object.

import { fetchFile } from 'url-to-file'

const file = await fetchFile('https://picsum.photos/200/300', 'image.png', {
   type: 'image/png',
})

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i url-to-file

    Weekly Downloads

    2

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    7.16 kB

    Total Files

    13

    Last publish

    Collaborators

    • alfredo.salzillo