Upload

Upload File

Share any file with a link that expires when you want it to.

Choose a File

No file selected
Drop your file here or click to choose a file Maximum 100MB

Expiration

File will be available for 1 day

Supported Formats

Images (JPG, PNG, GIF, WebP) Videos (MP4, WebM, MOV) Audio (MP3, WAV, OGG) Documents (PDF, TXT) Archives (ZIP, TAR)

API Usage

Endpoint POST /api/upload
Content-Type multipart/form-data
Max Size 100MB

Form Fields

file required The file to upload
expiry optional Expiration time (default: 1d)

Expiry Options

1h 1d 1w lifetime 30m 90m 2h 12h 3d 2w

Custom: 1m - 30d. Example: 90m (90 minutes), 2h (2 hours), 3d (3 days)

Endpoints

POST /api/upload Upload a new file
GET /file/{id}.{ext} Download/view file
GET /api/upload/{id} File info (metadata)
curl -X POST "https://sylvatica.my.id/api/upload" \
  -F "file=@image.jpg" \
  -F "expiry=1d"

Replace image.jpg with your file path

Lifetime Example
curl -X POST "https://sylvatica.my.id/api/upload" \
  -F "file=@image.jpg" \
  -F "expiry=lifetime"
Custom Example (90 minutes)
curl -X POST "https://sylvatica.my.id/api/upload" \
  -F "file=@image.jpg" \
  -F "expiry=90m"
const formData = new FormData();
formData.append("file", file);
formData.append("expiry", "1d");

const response = await fetch("/api/upload", {
  method: "POST",
  body: formData
});

const result = await response.json();

if (result.status) {
  console.log("URL:", result.url);
  console.log("Expires:", result.expires_at);
} else {
  console.error("Error:", result.error);
}
import fs from "node:fs";
import path from "node:path";

async function uploadFile(filePath, expiry = "1d") {
  const fileBuffer = fs.readFileSync(filePath);
  const blob = new Blob([fileBuffer]);
  const formData = new FormData();
  formData.append("file", blob, path.basename(filePath));
  formData.append("expiry", expiry);

  const response = await fetch("https://sylvatica.my.id/api/upload", {
    method: "POST",
    body: formData
  });

  return response.json();
}

uploadFile("./image.jpg", "1d").then(console.log);

Requires Node.js 18+ with native fetch and FormData

<input type="file" id="fileInput">
<button id="uploadBtn">Upload</button>

<script>
document.getElementById("uploadBtn").addEventListener("click", async () => {
  const input = document.getElementById("fileInput");
  const file = input.files[0];
  if (!file) return;

  const formData = new FormData();
  formData.append("file", file);
  formData.append("expiry", "1d");

  const response = await fetch("/api/upload", {
    method: "POST",
    body: formData
  });

  const result = await response.json();
  console.log(result);
});
</script>

Response

201 Created Success
{
  "status": true,
  "message": "Upload success",
  "url": "https://sylvatica.my.id/sylva-a8k29x3p.jpg",
  "format": "jpg",
  "bytes": 123456,
  "expires_at": "2026-09-25T10:00:00Z",
  "expiry": "1d"
}
201 Created Lifetime
{
  "status": true,
  "message": "Upload success",
  "url": "https://sylvatica.my.id/sylva-b9l38y4q.png",
  "format": "png",
  "bytes": 234567,
  "expires_at": null,
  "expiry": "lifetime"
}
403 NSFW Content
{
  "status": false,
  "error": "nsfw_content"
}
413 File Too Large
{
  "status": false,
  "error": "file_too_large"
}

Error Codes

file_requiredNo file provided
file_too_largeFile exceeds 100MB limit
empty_fileFile is empty
blocked_file_typeFile extension not allowed
blocked_mime_typeMIME type not allowed
invalid_expiryInvalid expiry format
nsfw_contentContent not allowed