Closed
Conversation
Normalize storage path resolution across server and collector Centralizes all storage path constants into single source-of-truth exports: - server: baseStoragePath, documentsPath, directUploadsPath, vectorCachePath, hotdirPath - collector: basePrimaryStoragePath, WATCH_DIRECTORY, tmpStorage, documentsFolder This eliminates scattered NODE_ENV/STORAGE_DIR ternaries throughout the codebase and ensures consistent path resolution between server and collector. Other changes: - Fix hotdirPath to correctly point to collector/storage/hotdir in development - Add ensureRequiredDirectoriesExist() to create storage dirs on collector startup - Add path traversal protection in downloadURIToFile - Add eslint-plugin-import for unresolved import detection - Remove static placeholder files (now created dynamically)
Member
Author
|
TODO: Custom startup has broken DB path: export STORAGE_LOCATION=$HOME/anythingllm && \
mkdir -p $STORAGE_LOCATION && \
touch "$STORAGE_LOCATION/.env" && \
docker run -d -p 3001:3001 \
--cap-add SYS_ADMIN \
-v ${STORAGE_LOCATION}:/workspace \
-v ${STORAGE_LOCATION}/.env:/workspace/.env \
-e STORAGE_DIR="/workspace" \
ghcr.io/mintplex-labs/anything-llm:pr-5204 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Type
Relevant Issues
resolves #5152
Description
Patches issue with container
hotdirresolution.Visuals (if applicable)
Additional Information
Refactored a ton of the use of file paths across the application.
Normalize storage path resolution across server and collector
Centralizes all storage path constants into single source-of-truth exports:
baseStoragePath,documentsPath,directUploadsPath,vectorCachePath,hotdirPathbasePrimaryStoragePath,WATCH_DIRECTORY,tmpStorage,documentsFolderThis eliminates scattered NODE_ENV/STORAGE_DIR ternaries throughout the codebase and ensures consistent path resolution between server and collector.
Other changes:
Developer Validations
yarn lintfrom the root of the repo & committed changes