-
Notifications
You must be signed in to change notification settings - Fork 41
Issue 5730 - support model uploads through internal service #5761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Conversation
backend/src/v5/processors/teamspaces/projects/models/containers.js
Dismissed
Show dismissed
Hide dismissed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for model uploads through an internal service, enabling file uploads via file path references instead of multipart form data. Key changes include:
- Upgraded to ES2023 syntax to support private class methods
- Migrated file storage handler from v4 to v5 with improved functionality
- Deprecated GridFS support, setting default storage to filesystem only
- Added new
externalFSconfiguration for read-only file access by internal services
Reviewed changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| backend/.eslintrc.json | Updated ECMAScript version to 2023 |
| backend/src/v4/config.js | Set default storage type to use FileStorageTypes constant |
| backend/src/v4/handler/externalServices.js | Refactored to use v5 FS handler, removed GridFS/S3/Alluxio support |
| backend/src/v4/handler/fs.js | Removed v4 implementation (migrated to v5) |
| backend/src/v4/models/scene.js | Removed GridFS stream method |
| backend/src/v4/services/api.js | Added system check for filesystem configuration on startup |
| backend/src/v5/handler/fs.js | New v5 filesystem handler with class-based architecture and private methods |
| backend/src/v5/middleware/dataConverter/inputs/teamspaces/projects/models/containers.js | Added internal service support with file path validation and user creation |
| backend/src/v5/middleware/dataConverter/inputs/teamspaces/projects/models/drawings/index.js | Added owner extraction from session |
| backend/src/v5/middleware/permissions/components/models.js | Added bypass auth support and model existence validation |
| backend/src/v5/middleware/permissions/components/projects.js | Added bypass auth support for project admin checks |
| backend/src/v5/processors/teamspaces/projects/models/commons/modelList.js | Added bypass permissions parameter support |
| backend/src/v5/processors/teamspaces/projects/models/containers.js | Added read-only file flag to prevent deletion of external files |
| backend/src/v5/routes/routesManager.js | Reorganized routes to support internal service endpoints |
| backend/src/v5/routes/teamspaces/projects/models/common/general.js | Added internal service parameter and bypass auth support |
| backend/src/v5/routes/teamspaces/projects/models/common/revisions.js | Moved OpenAPI documentation and added internal service parameter |
| backend/src/v5/services/filesManager.js | Updated to use new FS handler interface and FileStorageTypes constants |
| backend/src/v5/services/initialiser.js | Added filesystem validation checks |
| backend/src/v5/utils/config.constants.js | Added FileStorageTypes constants |
| backend/src/v5/utils/helper/mimeTypes.js | Added BINARY mime type constant |
| backend/src/v5/utils/helper/typeCheck.js | Added isBool type checker |
| config/testV5/config.js | Added externalFS configuration and refactored directory creation |
| backend/tests/v5/helper/services.js | Added helper functions for temporary directories and email generation |
| Multiple test files | Updated tests to support new internal service functionality and removed GridFS references |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This fixes #5730
Description
fshandler/fsto v5, added driver testsexternalServicesis now wired to reference the v5 fs handler implementation.externalFSexternalFSexists if an internal api service is configuredexternalFSbypassAuthflagAcceptance Criteria
externalFSexternalFS