3.4 KiB
3.4 KiB
Silo Development Status
Date: 2026-01-23
Last Updated By: Claude Code Session
Current State: MinIO File Upload Implementation
Completed Work
1. Docker Compose - MinIO Service Added
- File:
deployments/docker-compose.yaml - Added MinIO service with versioning enabled
- Configured healthcheck and environment variables
- Note: Using
minio/minio:RELEASE.2024-01-16T16-07-38Zfor CPU compatibility
2. API Endpoints - File Upload/Download
- File:
internal/api/handlers.go
| Endpoint | Method | Description |
|---|---|---|
/api/items/{partNumber}/file |
POST | Upload file and create revision |
/api/items/{partNumber}/file |
GET | Download latest revision file |
/api/items/{partNumber}/file/{revision} |
GET | Download specific revision file |
/api/items/{partNumber}/revisions |
POST | Create revision without file |
3. Routes Added
- File:
internal/api/routes.go - All new endpoints wired up
4. FreeCAD Client Updated
- File:
pkg/freecad/silo_commands.py - Added
_upload_file()method for multipart form upload - Updated
create_revision()to optionally upload files - Updated
Silo_Commitcommand to save document and upload to MinIO
5. Build Status
- Go code compiles successfully -
go build ./...passes
Where We Left Off
Problem
MinIO container failing to start due to CPU architecture:
Fatal glibc error: CPU does not support x86-64-v2
Solution in Progress
- VM being rebooted to newer architecture
- Already configured older MinIO image as fallback
Next Steps After VM Reboot
1. Start Services
cd /home/forbes/projects/silo-0062/deployments
sudo docker compose up -d
2. Verify Services
# Check all services
sudo docker compose ps
# Check MinIO health
curl http://localhost:9000/minio/health/live
# Check Silo API with storage
curl http://localhost:8080/ready
3. Test File Upload
# Create test file
echo "Test content" > /tmp/test.FCStd
# Upload to existing item
curl -X POST \
-F "file=@/tmp/test.FCStd" \
-F "comment=Test upload" \
-F 'properties={"test": true}' \
http://localhost:8080/api/items/3DX15-A01-0002/file
4. Test File Download
# Download latest revision
curl http://localhost:8080/api/items/3DX15-A01-0002/file -o downloaded.FCStd
# Download specific revision
curl http://localhost:8080/api/items/3DX15-A01-0002/file/2 -o rev2.FCStd
5. Test from FreeCAD
- Open FreeCAD with Silo workbench
- Open an existing item:
Silo_Opencommand - Make changes
- Commit with file upload:
Silo_Commitcommand - Verify file appears in MinIO console at http://localhost:9001
Remaining MVP Tasks
| Task | Status | Priority |
|---|---|---|
| Start docker-compose with MinIO | Pending | Next |
| Test full upload/download flow | Pending | High |
| Implement date segment support | Pending | Medium |
| Implement part number validation | Pending | Medium |
| Add unit tests | Pending | Medium |
File Changes This Session
modified: deployments/docker-compose.yaml (added MinIO service)
modified: internal/api/handlers.go (added file handlers)
modified: internal/api/routes.go (added file routes)
modified: pkg/freecad/silo_commands.py (added file upload)
MinIO Console Access
Once running:
- URL: http://localhost:9001
- Username: silominio
- Password: silominiosecret
- Bucket: silo-files