/api/upload
Multipart upload. Returns id, key, url, and directUrl.
File infrastructure / 01
Fyltr is a small, predictable CDN API for uploads, public delivery, and access logs you can inspect when you need them.
QUICK START
Upload and inspect
const axios = require('axios')
const FormData = require('form-data')
const buffer = await m.quoted.download()
const form = new FormData()
form.append('file', buffer, {
filename: 'image.jpg',
contentType: m.quoted.mimetype || 'image/jpeg',
knownLength: buffer.length,
})
const { data } = await axios.post(
'https://fyltr-mu.vercel.app/api/upload',
form,
{ headers: form.getHeaders(), maxBodyLength: Infinity },
)
console.log(data) // { id, key, url, directUrl }
const logs = await axios.get(
'https://fyltr-mu.vercel.app/get/ID_FILE?key=KEY',
)Endpoints
Multipart upload. Returns id, key, url, and directUrl.
Public delivery URL. No key required; access is logged.
JSON access log. Requires the file key from upload.
The upload key only protects log access. Keep it private; the file URL remains public and does not require a key.