v1.0.0
An utility to convert url to File object.
Repository
Current version released
3 years ago
Versions
url-to-file
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',
})