mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-25 17:05:56 +03:00
[PR #411] [MERGED] Tenant-scoped Video Studio storage resolver and legacy uploads migration #716
Labels
No labels
AI Content Agents
AI Content Strategy
AI Content planning
AI Marketing Tools
AI SEO
AI personalization
AI writer
ALwrity Copi-lot
Alwrity web search
Anthropic
DeepSeek
Gemini AI
Integration
LLM
OnBoarding
OnBoarding
RAG knowledgebase Memory
bug
documentation
enhancement
good first issue
help wanted
invalid
openai
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ALwrity#716
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AJaySi/ALwrity/pull/411
Author: @AJaySi
Created: 3/12/2026
Status: ✅ Merged
Merged: 3/12/2026
Merged by: @AJaySi
Base:
main← Head:codex/implement-shared-path-resolver-and-update-avatar.py📝 Commits (1)
29c268dAdd tenant-aware video studio storage path resolver📊 Changes
3 files changed (+222 additions, -13 deletions)
View changed files
📝
backend/api/video_studio/handlers/avatar.py(+26 -13)➕
backend/scripts/migrate_video_studio_uploads_to_workspace.py(+127 -0)➕
backend/utils/storage_paths.py(+69 -0)📄 Description
Motivation
workspace/workspace_<safe_user_id>/media/...).Description
backend/utils/storage_paths.pythat exposesresolve_user_media_path,get_user_workspace,get_workspace_root,sanitize_user_id, andget_legacy_video_studio_upload_dirs, with path sanitization and escaping protection.backend/api/video_studio/handlers/avatar.pyto remove the globalUPLOAD_DIR, useresolve_user_media_path(user_id, "video_studio", "uploads", create=True)for temp uploads andresolve_user_media_path(user_id, "video_studio", "videos", create=True)for generated outputs, and to create these directories per-request.avatar.pyto search tenant media paths first and then fall back to known legacy global upload directories returned byget_legacy_video_studio_upload_dirsto maintain backward compatibility.backend/scripts/migrate_video_studio_uploads_to_workspace.pythat buildstask_id -> user_idmappings by scanning per-user DBs and can move legacyvideo_studio/uploadsartifacts into tenantmedia/video_studio/{uploads|videos}directories (dry-run by default,--applyto move).Testing
python -m py_compile backend/utils/storage_paths.py backend/api/video_studio/handlers/avatar.py backend/scripts/migrate_video_studio_uploads_to_workspace.pywhich completed successfully.--apply).Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.