ai-business-write/技术文档/MinIO文件位置说明.md

138 lines
3.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# MinIO文件位置说明
## ✅ 确认:文件没有被删除!
测试脚本**只删除了本地临时文件****不会删除MinIO上的文件**。所有上传的文件都还在MinIO中。
---
## 📍 测试文件位置
### 1. 测试上传的文件
找到了 **3个测试文件**,位置在:
```
存储桶: finyx
路径前缀: 615873064429507639/TEST/2025/12/
```
具体文件:
1. **test_file_20251205095549.txt**
- 完整路径: `615873064429507639/TEST/2025/12/test_file_20251205095549.txt`
- 大小: 122 字节
- 上传时间: 2025-12-05 01:55:49
2. **test_file_20251205095558.txt**
- 完整路径: `615873064429507639/TEST/2025/12/test_file_20251205095558.txt`
- 大小: 122 字节
- 上传时间: 2025-12-05 01:55:58
3. **test_file_20251205095620.txt**
- 完整路径: `615873064429507639/TEST/2025/12/test_file_20251205095620.txt`
- 大小: 122 字节
- 上传时间: 2025-12-05 01:56:20
### 2. 模板文件
找到了 **1个模板文件**
- **初步核实审批表模板.docx**
- 完整路径: `615873064429507639/TEMPLATE/2025/12/初步核实审批表模板.docx`
- 大小: 21101 字节
- 上传时间: 2025-12-02 06:42:56
---
## 🔍 如何在MinIO中查找文件
### 方式1通过MinIO Web界面
1. 登录MinIO Web界面
2. 选择存储桶:`finyx`
3. 导航到路径:
```
finyx/
└── 615873064429507639/
├── TEST/
│ └── 2025/
│ └── 12/
│ ├── test_file_20251205095549.txt
│ ├── test_file_20251205095558.txt
│ └── test_file_20251205095620.txt
└── TEMPLATE/
└── 2025/
└── 12/
└── 初步核实审批表模板.docx
```
### 方式2使用查询脚本
运行检查脚本查看所有文件:
```bash
python check_minio_files.py
```
这个脚本会列出:
- 所有测试文件
- 所有与租户相关的文件共442个
- 所有模板文件
---
## 📊 文件统计
- **测试文件**: 3个在 `TEST/` 目录下)
- **模板文件**: 1个在 `TEMPLATE/` 目录下)
- **租户相关文件总数**: 442个
---
## 🔗 访问文件
### 生成访问URL
如果需要访问这些文件可以使用以下Python代码生成预签名URL
```python
from minio import Minio
from datetime import timedelta
client = Minio(
'minio.datacubeworld.com:9000',
access_key='JOLXFXny3avFSzB0uRA5',
secret_key='G1BR8jStNfovkfH5ou39EmPl34E4l7dGrnd3Cz0I',
secure=True
)
# 生成访问URL7天有效
object_name = '615873064429507639/TEST/2025/12/test_file_20251205095620.txt'
url = client.presigned_get_object(
'finyx',
object_name,
expires=timedelta(days=7)
)
print(url)
```
---
## ✅ 验证结果
- ✅ 文件确实存在
- ✅ 文件没有被删除
- ✅ 文件路径正确
- ✅ 可以正常访问
如果您在MinIO界面中找不到
1. 确认您查看的是正确的存储桶:`finyx`
2. 导航到正确的路径:`615873064429507639/TEST/2025/12/`
3. 或者运行 `python check_minio_files.py` 查看详细列表
---
**文件都在,请放心!** 🎉