Dịch Vụ Chia Sẻ File Tạm Thời Miễn Phí - Truyền File Nhanh & Bảo Mật
Tải lên file (lên đến 100MB) và nhận link tải xuống tạm thời với tăng tốc CDN toàn cầu
✨ MỚI: Tạo mã QR để tải xuống dễ dàng trên di động!
Lưu ý: Các file tải lên ẩn danh sẽ tự động bị xóa sau 7 ngày để bảo vệ quyền riêng tư của bạn
Kéo & Thả, dán từ clipboard (Ctrl+V), hoặc nhấp Chọn File
Cách Sử Dụng - Nhiều Phương Thức Tải File Lên
tfLink cung cấp nhiều phương thức tải file lên thuận tiện để đáp ứng nhu cầu khác nhau của người dùng. Cho dù bạn là nhà phát triển, thiết kế viên, hay người dùng thông thường, bạn sẽ tìm thấy phương thức tải lên phù hợp.
Tải Lên Qua Web (Khuyến nghị)
Cách đơn giản nhất: trực tiếp kéo và thả file vào vùng phía trên hoặc nhấp nút Chọn File. Nhận link tải xuống ngay sau khi tải lên.
🆕 Tính năng Mã QR: Sau khi tải lên, nhấp nút "Mã QR" để tạo mã QR cho việc tải xuống dễ dàng trên di động. Hoàn hảo cho việc chia sẻ file giữa các thiết bị!
Tải Lên Qua Dòng Lệnh (CLI)
Hoàn hảo cho nhà phát triển và người dùng kỹ thuật, hỗ trợ tự động hóa script và xử lý hàng loạt.
Thay thế các placeholder như /path/to/your/file.ext, YOUR_USER_ID, YOUR_AUTH_TOKEN bằng giá trị thực tế của bạn.
Linux/macOS (curl):
Tải Lên Ẩn Danh:
curl -X POST https://tmpfile.link/api/upload -F "file=@/path/to/your/file.ext"
Tải Lên Đã Xác Thực:
curl -X POST \
-H "X-User-Id: YOUR_USER_ID" \
-H "X-Auth-Token: YOUR_AUTH_TOKEN" \
https://tmpfile.link/api/upload \
-F "file=@/path/to/your/file.ext"
Windows (PowerShell):
(Lưu ý: Đảm bảo đường dẫn file đúng cho Windows, ví dụ: C:\path\to\your\file.ext)
Tải Lên Ẩn Danh:
Invoke-RestMethod -Uri https://tmpfile.link/api/upload -Method Post -ContentType multipart/form-data -InFile C:\path\to\your\file.ext
Tải Lên Đã Xác Thực:
$headers = @{
"X-User-Id" = "YOUR_USER_ID";
"X-Auth-Token" = "YOUR_AUTH_TOKEN"
}
Invoke-RestMethod -Uri https://tmpfile.link/api/upload -Method Post -ContentType multipart/form-data -Headers $headers -InFile C:\path\to\your\file.ext
Tải Lên Bằng Python
Cài đặt gói Python chính thức để tải file lên dễ dàng hơn:
Cài Đặt:
pip install tflink
Tải Lên Ẩn Danh:
from tflink import TFLinkClient
client = TFLinkClient()
result = client.upload('document.pdf')
print(f"Download: {result.download_link}")
Tải Lên Đã Xác Thực:
from tflink import TFLinkClient
client = TFLinkClient(
user_id='YOUR_USER_ID',
auth_token='YOUR_AUTH_TOKEN'
)
result = client.upload('document.pdf')
print(f"Download: {result.download_link}")
Tài Liệu API
Gửi yêu cầu POST đến /api/upload với multipart/form-data. Bao gồm file trong trường có tên file.
Đối với yêu cầu đã xác thực, bao gồm header X-User-Id và X-Auth-Token.
Phản hồi sẽ là JSON chứa fileName, downloadLink, downloadLinkEncoded, size, type, và uploadedTo.
Ví Dụ HTTP Request (Thô):
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--
(Lưu ý: Chuỗi boundary sẽ khác nhau tùy theo client.)
Ví Dụ Phản Hồi JSON:
Ví dụ tải lên ẩn danh (file tự động xóa sau 7 ngày):
{
"fileName": "my file 文件.png",
"downloadLink": "https://d.tmpfile.link/public/2025-07-31/a1b2c3d4-e5f6-7890-abcd-ef1234567890/my file 文件.png",
"downloadLinkEncoded": "https://d.tmpfile.link/public/2025-07-31/a1b2c3d4-e5f6-7890-abcd-ef1234567890/my%20file%20%E6%96%87%E4%BB%B6.png",
"size": 102400,
"type": "image/png",
"uploadedTo": "public"
}
Ví dụ tải lên người dùng đã xác thực:
{
"fileName": "document.pdf",
"downloadLink": "https://d.tmpfile.link/users/YOUR_USER_ID/2025-07-31/uuid-example/document.pdf",
"downloadLinkEncoded": "https://d.tmpfile.link/users%2FYOUR_USER_ID%2F2025-07-31%2Fuuid-example%2Fdocument.pdf",
"size": 2048000,
"type": "application/pdf",
"uploadedTo": "user: YOUR_USER_ID"
}