← Back to Home

File Inspector

/inspect/file
Upload and analyze files to get detailed metadata, file type detection, SHA-256 hash, and content preview. Supports images, documents, and binary files. **Privacy: Files are NOT stored** - they are processed in memory only and immediately discarded after analysis. Maximum file size: 10MB.
Try it now

Parameters

file multipart
File to inspect

Examples

curl
# Upload a file for analysis
curl -X POST https://tcpdata.com/inspect/file \
  -F "file=@document.pdf"

# Returns:
# {
#   "filename": "document.pdf",
#   "size_bytes": 245632,
#   "size_human": "239.88 KB",
#   "mime_type": "application/pdf",
#   "detected_type": "PDF",
#   "sha256": "a3c5...",
#   "content_preview": "...",
#   "analyzed_at": "2025-10-04T..."
# }
JavaScript (fetch)
const formData = new FormData();
formData.append('file', fileInput.files[0]);

const response = await fetch('https://tcpdata.com/inspect/file', {
  method: 'POST',
  body: formData
});
const analysis = await response.json();
console.log(analysis);
Python (requests)
import requests

with open('document.pdf', 'rb') as f:
    response = requests.post('https://tcpdata.com/inspect/file',
                            files={'file': f})
    print(response.json())