
📦 Out-Of-The-Box & Powerful File Parsing Service, support Text/Pdf/Docx/Pptx/Xlsx/Image/Audio parsing, support OCR, support Base64/Local/S3/R2/TG/MinIO storage.
File Service for Chat Nio
👉 More View: Github - Chat Nio Blob Service
POST /upload Upload a file
{
"file": "[file]",
"enable_ocr": false,
"enable_vision": true,
"save_all": false
}
Response
{
"status": true,
"type": "pdf",
"content": "...",
"error": ""
}
1 🎨 General Config (Optional)PDF_MAX_IMAGES: Max Images Extracted from a PDF File (Default: 10)
MAX_FILE_SIZE: Max Uploaded File Size MiB (Default: -1, No Limit)
CORS_ALLOW_ORIGINS: CORS Allow Origins (Default: *)
2 🔊 Audio Config (Optional)AZURE_SPEECH_KEY: Azure Speech to Text Service Key (Required for Audio Support)AZURE_SPEECH_REGION: Azure Speech to Text Service Region (Required for Audio Support)3 🖼 Storage Config (Optional)[!NOTE] Storage Config Apply to Image Files And
Save AllOption Only.
✨ No Storage (Default)
gpt-4-all)📁 Local Storage
STORAGE_TYPE to local (e.g. STORAGE_TYPE=local)LOCAL_STORAGE_DOMAIN to your deployment domain (e.g. LOCAL_STORAGE_DOMAIN=http://blob-service.onrender.com)/app/static to the host (e.g. -v /path/to/static:/app/static)🚀 AWS S3
STORAGE_TYPE to s3 (e.g. STORAGE_TYPE=s3)S3_ACCESS_KEY to your AWS Access Key IDS3_SECRET_KEY to your AWS Secret Access KeyS3_BUCKET to your AWS S3 Bucket NameS3_REGION to your AWS S3 RegionSTORAGE_TYPE to s3 (e.g. STORAGE_TYPE=s3)S3_ACCESS_KEY to your Cloudflare R2 Access Key IDS3_SECRET_KEY to your Cloudflare R2 Secret Access KeyS3_BUCKET to your Cloudflare R2 Bucket NameS3_DOMAIN to your Cloudflare R2 Domain Name (e.g. https://<account-id>.r2.cloudflarestorage.com)S3_DIRECT_URL_DOMAIN to your Cloudflare R2 Public URL Access Domain Name (Open Public URL Access, e.g. https://pub-xxx.r2.dev)📦 Min IO
STORAGE_TYPE to s3 (e.g. STORAGE_TYPE=s3)S3_SIGN_VERSION to s3v4 (e.g. S3_SIGN_VERSION=s3v4)S3_ACCESS_KEY to your Min IO Access Key IDS3_SECRET_KEY to your Min IO Secret Access KeyS3_BUCKET to your Min IO Bucket NameS3_DOMAIN to your Min IO Domain Name (e.g. https://oss.example.com)S3_DIRECT_URL_DOMAIN to your Min IO Public URL Access Domain Name (e.g. https://cdn-hk.example.com)STORAGE_TYPE to tg (e.g. STORAGE_TYPE=tg)TG_ENDPOINT to your TG-STATE Endpoint (e.g. TG_ENDPOINT=https://tgstate.vercel.app)TG_PASSWORD to your TG-STATE Password4 🔍 OCR Config (Optional)[!NOTE] OCR Support is based on 👉 PaddleOCR API (✔ Self Hosted ✔ Open Source)
OCR_ENDPOINT Paddle OCR Endpoint
Save All Options Without Storage Config:
save_all option without storage config. You need to set STORAGE_TYPE to local or other storage type to use this option.enable_vision and enable_ocr at the same time. You need to enable at least one of them to process image files..pptx format to process it..docx format to process it.MAX_FILE_SIZE limit. You need to reduce the file size to upload it.