Skip to content

fix(projects): save project attachments in the uploads volume - #884

Merged
evilguy4000 merged 1 commit into
DRYTRIX:developfrom
jayhemnani9910:fix/project-attachments-upload-volume
Nov 17, 2026
Merged

evilguy4000 merged 1 commit into
DRYTRIX:developfrom
jayhemnani9910:fix/project-attachments-upload-volume

Conversation

@jayhemnani9910

Copy link
Copy Markdown
Contributor

Uploading an attachment to a project returns 500 in the Docker image:

File "/app/app/routes/projects.py", line 2322, in upload_project_attachment
    os.makedirs(upload_dir, exist_ok=True)
PermissionError: [Errno 13] Permission denied: '/app/app/../uploads'

The route saves to uploads/project_attachments under the project root, which the timetracker user can't create in the image. When it does work (from source), the file is outside the compose volumes and is lost when the container is recreated.

#606 moved the client, quote, comment and other attachment routes to app/static/uploads/<name>, which is the app_uploads volume, but not this one. This uses the same folder for project attachments. Download and delete already resolve the stored path with resolve_stored_upload_path, so they work with it.

Added tests/test_project_attachments.py, which uploads through the route and checks the file is saved under app/static/uploads; it fails without the change. The project test files pass.

@evilguy4000
evilguy4000 merged commit 4e9c6c2 into DRYTRIX:develop Nov 17, 2026
24 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 18, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants