// In the browser: no SDK, no API keyconst picked = document.querySelector('input[type=file]').files[0];
// 1. Ask your own server for an upload URLconst { upload } = awaitfetch('/api/upload', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ name: picked.name, size: picked.size, type: picked.type }),
}).then((r) => r.json());
// 2. Send the bytes straight to Rapidfile (files up to 95 MB use one PUT)const res = awaitfetch(upload.url, { method: 'PUT', body: picked });
const { file } = await res.json();
console.log(file.url); // https://cdn.rapidfile.cc/<id>/<name>
terminal
# 1. Create an upload (server side, with your secret key)curl https://api.rapidfile.cc/v1/uploads \
-H"Authorization: Bearer $RAPIDFILE_SECRET_KEY" \
-H"Content-Type: application/json" \
-d'{"name":"cat.jpg","size":48213,"type":"image/jpeg"}'# 2. PUT the bytes to upload.url from the response (no key needed)curl-T cat.jpg "$UPLOAD_URL"# Or upload from your server in one request (up to 95 MB)curl-T cat.jpg -H"Content-Type: image/jpeg" \
-H"Authorization: Bearer $RAPIDFILE_SECRET_KEY" \
"https://api.rapidfile.cc/v1/files?name=cat.jpg"
Upload API sapa Rapidfile plan ukan utjiwa: 2 GB wiñay storage ukat sinm CDN requests free, Rapidfile Plus ukat Pro ukan juk'ampi storage. Ancha uso ukatakix add-ons 100 GB ukatakix $5 phaxsi kamaw qalltaraki. Precios chiqa: janiw bandwidth jan ukax apaña pagañ. Precios uñjaña.
¿Archivonak kunjam imantasi?
Wiñayatakix. Upload API wiñay storage: archivonak imantasi dashboard ukan tukuñ kama jan ukax aplicación API (DELETE /v1/files/:id) ukan tukuyañ kama. Janiw kuna mayjt'atäkiti, Rapidfile transferencias ukat ukax ukat 1 hora kama 30 urunak kama tukuyasi.