Dev by Khairul Islam

File Uploader API Documentation

📌 Base URL

https://3dapi.nbsk.top/upload.php

1️⃣ GET All Files

Method: GET

URL: https://3dapi.nbsk.top/upload.php

Parameters: None

Response:

{
  "success": true,
  "count": 3,
  "files": [
    {
      "id": 1,
      "filename": "2025-12-10_123456.txt",
      "original_name": "example.txt",
      "size_bytes": 1024,
      "mime_type": "text/plain",
      "uploaded_at": "2025-12-10 12:00:00",
      "url": "https://3dapi.nbsk.top/uploads/2025-12-10_123456.txt"
    }
  ]
}
            

2️⃣ GET Single File by ID

Method: GET

URL: https://3dapi.nbsk.top/upload.php?id=FILE_ID

Parameters:

Response:

{
  "success": true,
  "file": {
    "id": 1,
    "filename": "2025-12-10_123456.txt",
    "original_name": "example.txt",
    "size_bytes": 1024,
    "mime_type": "text/plain",
    "uploaded_at": "2025-12-10 12:00:00",
    "url": "https://3dapi.nbsk.top/uploads/2025-12-10_123456.txt"
  }
}
            

3️⃣ POST Upload New File

Method: POST

URL: https://3dapi.nbsk.top/upload.php

Form Data:

Response:

{
  "success": true,
  "id": 4,
  "filename": "2025-12-10_654321.jpg",
  "original_name": "myphoto.jpg",
  "size_bytes": 204800,
  "mime_type": "image/jpeg",
  "uploaded_at": "2025-12-10 12:05:00",
  "url": "https://3dapi.nbsk.top/uploads/2025-12-10_654321.jpg"
}
            

4️⃣ POST Update File

Method: POST

URL: https://3dapi.nbsk.top/upload.php

Form Data:

Response:

{
  "success": true,
  "message": "File info updated"
}
OR
{
  "success": true,
  "message": "File info and content updated"
}
            

5️⃣ DELETE File

Method: DELETE

URL: https://3dapi.nbsk.top/upload.php

Body: x-www-form-urlencoded

Response:

{
  "success": true,
  "message": "File deleted"
}
            

Note: Make sure your /uploads folder exists and is writable. CORS is enabled, so you can call this API from any frontend.