Endpoint

API Download File

Download file melalui ID dengan berbagai metode

Endpoint Tersedia

GET
/api/d/{id}

Download file langsung via API route

Contoh: https://upload.yilzidev.tech/api/d/abc123

GET
/api/getfile/{id}

Redirect 302 ke file langsung

Contoh: https://upload.yilzidev.tech/api/getfile/abc123

GET
/api/files/{id}

Dapatkan metadata file

Contoh: https://upload.yilzidev.tech/api/files/abc123

GET
/download/d/{id}

Halaman berbagi dengan preview

Contoh: https://upload.yilzidev.tech/download/d/abc123

Download Langsung

Akses file langsung via URL sederhana

Halaman Berbagi

Halaman berbagi dengan preview dan QR code

Redirect API

Redirect HTTP 302 ke file langsung

Contoh Kode

Download Langsung

curl -L "https://upload.yilzidev.tech/api/d/abc123" --output downloaded-file.jpg

Cek Redirect API

curl -I "https://upload.yilzidev.tech/api/getfile/abc123"

Contoh Penggunaan

Direct Download (/api/d/{id})

HTTP/1.1 200 OK
Content-Type: image/jpeg
Content-Length: 123456
Content-Disposition: inline

[binary file content]

API Redirect (/api/getfile/{id})

HTTP/1.1 302 Found
Location: https://upload.yilzidev.tech/api/d/abc123
Cache-Control: public, max-age=3600

Share Page (/download/d/{id})

HTTP/1.1 200 OK
Content-Type: text/html

<!DOCTYPE html>
<html>
<head>
    <title>Shared File - file.jpg</title>
</head>
<body>
    <!-- File preview, download buttons, QR code -->
</body>
</html>