📤 Upload File
Drag & drop file di sini atau klik untuk memilih
Maksimal 50MB per file
📋 File Terupload
Belum ada file yang diupload
📚 Dokumentasi API
Upload File
POST
https://zynnaa-uploader2.hf.space/upload
Upload file menggunakan FormData:
const formData = new FormData();
formData.append('file', fileInput.files[0]);
// Opsional: Header X-User-ID untuk user tertentu
const headers = {
'X-User-ID': 'your-user-id'
};
fetch('https://zynnaa-uploader2.hf.space/upload', {
method: 'POST',
headers: headers,
body: formData
})
.then(response => response.json())
.then(data => console.log(data));
List Uploads
GET
https://zynnaa-uploader2.hf.space/listupload?iduser=USER_ID
Mendapatkan daftar file yang diupload oleh user:
// Dengan query parameter
fetch('https://zynnaa-uploader2.hf.space/listupload?iduser=USER_ID')
.then(response => response.json())
.then(data => console.log(data));
// Atau dengan header
fetch('https://zynnaa-uploader2.hf.space/listupload', {
headers: {
'X-User-ID': 'USER_ID'
}
})
.then(response => response.json())
.then(data => console.log(data));
Delete File
DELETE
https://zynnaa-uploader2.hf.space/deletefile?idfile=FILE_ID
Menghapus file berdasarkan ID file:
fetch('https://zynnaa-uploader2.hf.space/deletefile?idfile=FILE_ID', {
method: 'DELETE',
headers: {
'X-User-ID': 'USER_ID' // opsional
}
})
.then(response => response.json())
.then(data => console.log(data));
Akses File
GET
https://zynnaa-uploader2.hf.space/NAMA_FILE
File yang diupload dapat diakses langsung via URL:
https://zynnaa-uploader2.hf.space/hKslO28KUloS.jpg
https://zynnaa-uploader2.hf.space/aBc123Def456.pdf
https://zynnaa-uploader2.hf.space/XyZ789AbC012.png