Temporary File Sharing

Upload a file (max 100MB) to get a temporary download link.

Note: Files uploaded anonymously will be automatically deleted after 7 days.

Drag & Drop your file here or click Choose File

How to Use

CLI (using curl)

Replace placeholders like /path/to/your/file.ext, YOUR_USER_ID, YOUR_AUTH_TOKEN with your actual values.

Linux/macOS (curl):

Anonymous Upload:
curl -X POST -F "file=@/path/to/your/file.ext" https://tmpfile.link/api/upload
Authenticated Upload:
curl -X POST \
     -H "X-User-Id: YOUR_USER_ID" \
     -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
     -F "file=@/path/to/your/file.ext" \
     https://tmpfile.link/api/upload

Windows (PowerShell):

(Note: Ensure file paths are correct for Windows, e.g., C:\path\to\your\file.ext)

Anonymous Upload:
Invoke-RestMethod -Uri https://tmpfile.link/api/upload -Method Post -InFile C:\path\to\your\file.ext -ContentType multipart/form-data
Authenticated Upload:
$headers = @{
    "X-User-Id"    = "YOUR_USER_ID";
    "X-Auth-Token" = "YOUR_AUTH_TOKEN"
}
Invoke-RestMethod -Uri https://tmpfile.link/api/upload -Method Post -InFile C:\path\to\your\file.ext -ContentType multipart/form-data -Headers $headers

API

Send a POST request to /api/upload with multipart/form-data. Include the file in a field named file.

For authenticated requests, include X-User-Id and X-Auth-Token headers.

The response will be JSON containing fileName, downloadLink, downloadLinkEncoded, size, type, and uploadedTo.

Example HTTP Request (Raw):

POST /api/upload HTTP/1.1
Host: tmpfile.link
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
# Optional headers for authentication:
# X-User-Id: YOUR_USER_ID
# X-Auth-Token: YOUR_AUTH_TOKEN

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="yourfile.txt"
Content-Type: text/plain

(content of your file here)
------WebKitFormBoundary7MA4YWxkTrZu0gW--

(Note: The boundary string will vary based on the client.)

Example JSON Response:

{
  "fileName": "example.png",
  "downloadLink": "https://d.tmpfile.link/public/a1b2c3d4-e5f6-7890-abcd-ef1234567890/example.png",
  "downloadLinkEncoded": "https://d.tmpfile.link/public%2Fa1b2c3d4-e5f6-7890-abcd-ef1234567890%2Fexample.png",
  "size": 102400,
  "type": "image/png",
  "uploadedTo": "public"
}

Or for an authenticated upload:

{
  "fileName": "document.pdf",
  "downloadLink": "https://d.tmpfile.link/users/chris/b2c3d4e5-f6a7-8901-bcde-f1234567890a/document.pdf",
  "downloadLinkEncoded": "https://d.tmpfile.link/users%2Fchris%2Fb2c3d4e5-f6a7-8901-bcde-f1234567890a%2Fdocument.pdf",
  "size": 2048000,
  "type": "application/pdf",
  "uploadedTo": "user: chris"
}