← Back to upload

📤 Public API: File Upload

This API allows users to upload image and video files to SelfGoneFile's infrastructure. After upload, it returns public access URLs and a secure deletion link.

🔐 Authentication

This endpoint is public. No token or key is required. However, rate limiting is enforced per IP using Redis.

📦 Request Format

Use multipart/form-data for the request body.

📎 Example with curl

curl -X POST https://api.selfgonefile.com/api/upload \
  -F "file=@./test.gif" \
  -F "storage_duration=1d"

✅ Allowed File Types

Max file size: 99MB per upload.

🔁 What Happens Internally

  1. A unique hash ID is calculated.
  2. The file is uploaded to MinIO storage.
  3. A database entry is created with metadata.
  4. A thumbnail is queued for generation (if applicable).
  5. A secret deletion token is generated and linked to a secure deletion URL.

📤 JSON Response

{
  "id": "cmcia198c0002oh01k5d7at1y",
  "file": "https://api.selfgonefile.com/api/v/cmcia198c0002oh0y.gif",
  "thumbnail": "https://api.selfgonefile.com/api/v/cmcia198c0002oh0y/thumb",
  "delete": "https://api.selfgonefile.com/api/v/cmcia198c0002oh0y/delete?token=..."
}

🛡️ Validation and Limits

⌛ Storage Duration Options

ValueExpires After
1d1 day
7d7 days
1m1 month
12m12 months

⚠️ Error Responses

📬 Contact

Email: [email protected]

Report abuse: [email protected]

API maintained for public convenience. Please be respectful with your usage. ❤️

Build version: v-e6e9b24