Skip to content

alfredosalzillo/url-to-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

url-to-file

CI/CD codecov deno land 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

Use on Deno.

import { fetchFile } from 'https://deno.land/x/url_to_file@v1.1.0/main.ts'

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

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',
})

About

An utility to convert url to File object.

Resources

Stars

Watchers

Forks

Packages

No packages published