Package for m1r.ai
pnpm add node-mirai
import { upload } from 'node-mirai'
const { url } = await upload(
'./path/to/file.png',
{
headers: {
Random: 'test-image',
CustomHeader: 'test'
}
}
)
console.log(url)
Accept type File
Blob
string
, can be stream of file or path to the file
Optional, mostly alias from node fetch()
options with additional upload options