Skip to content

added file upload storage and versions metadata for FileVersion model#37

Open
zainabbaker290 wants to merge 4 commits into
propylon:mainfrom
zainabbaker290:feature/store_any_files
Open

added file upload storage and versions metadata for FileVersion model#37
zainabbaker290 wants to merge 4 commits into
propylon:mainfrom
zainabbaker290:feature/store_any_files

Conversation

@zainabbaker290

Copy link
Copy Markdown

now able to upload and get files
upload handles any type of files and multiples of the same files
Get returns file metadata in json format

Copilot AI review requested due to automatic review settings June 30, 2026 11:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds upload/download support and version metadata for the FileVersion model, exposing new REST endpoints to upload files and retrieve stored document revisions.

Changes:

  • Extend FileVersion with storage + metadata fields and auto-incrementing version logic.
  • Add endpoints for uploading files (/api/file_versions/, /api/documents/<path>) and retrieving a specific revision via ?revision=....
  • Expand test coverage around upload, version increments, and revision retrieval.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/test_file_versions.py Adds API-level tests for uploads, multi-version behavior, and revision retrieval.
tests/factories.py Adjusts typing imports used by test factories.
tests/conftest.py Ensures Django is configured for pytest and enables DB/media storage fixtures for tests.
src/propylon_document_manager/site/urls.py Registers the new catch-all /api/documents/<path:url_path> routes and media URL handling.
src/propylon_document_manager/site/api_router.py Updates router imports for the file version API.
src/propylon_document_manager/file_versions/models.py Extends FileVersion schema and implements version auto-increment + ordering.
src/propylon_document_manager/file_versions/migrations/0002_fileversion_storage_fields.py Adds new storage/metadata fields and updates version_number type/default.
src/propylon_document_manager/file_versions/migrations/0003_alter_fileversion_options.py Adds default ordering on uploaded_at/version_number.
src/propylon_document_manager/file_versions/api/views.py Implements upload/download behavior including revision selection.
src/propylon_document_manager/file_versions/api/serializers.py Adds upload-aware serializer fields and create logic for uploads.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/propylon_document_manager/site/api_router.py
Comment thread src/propylon_document_manager/site/urls.py Outdated
Comment thread src/propylon_document_manager/file_versions/models.py Outdated
Comment thread src/propylon_document_manager/file_versions/models.py Outdated
Comment thread src/propylon_document_manager/file_versions/api/serializers.py Outdated
Comment thread src/propylon_document_manager/file_versions/api/views.py Outdated
Comment thread src/propylon_document_manager/file_versions/api/views.py
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