Add a new endpoint to handle file uploads for local storage
dn53
07c4230
Adds the `/api/evidence/upload/<int:file_id>` PUT endpoint to the evidence blueprint to handle file uploads, verifies upload session status, and writes file data to local storage. Also removes extraneous console logs from client-side JavaScript.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: d2e4f9d2-73d4-475f-9937-8a1aa1b15e2d
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/2fb4ea93-ac3a-4c8e-a374-bb86029c18ef/d2e4f9d2-73d4-475f-9937-8a1aa1b15e2d/kob3q56
Update button text and streamline the evidence upload process
dn53
1e6c836
Refactors the evidence creation and upload flow by renaming the button to "Create and upload", simplifying the JavaScript for handling file uploads, and removing redundant debugging logs from the API.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: f612404e-3a24-4a59-a9ce-5c4e0f1ea874
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/2fb4ea93-ac3a-4c8e-a374-bb86029c18ef/f612404e-3a24-4a59-a9ce-5c4e0f1ea874/mjoq2mR
Improve attestation creation flow to include necessary key
dn53
dee69db
Add key generation logic to the attestation creation process and update the frontend to include this key in the API request.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: f612404e-3a24-4a59-a9ce-5c4e0f1ea874
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/2fb4ea93-ac3a-4c8e-a374-bb86029c18ef/f612404e-3a24-4a59-a9ce-5c4e0f1ea874/mjoq2mR
Align attestation creation with API definition and improve file upload
dn53
37c944a
Remove direct file upload endpoint, update attestation creation to use key, content_type, and context_type as per swagger, and modify presigned URL generation in MinIO storage to optionally use session ID.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: f612404e-3a24-4a59-a9ce-5c4e0f1ea874
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/2fb4ea93-ac3a-4c8e-a374-bb86029c18ef/f612404e-3a24-4a59-a9ce-5c4e0f1ea874/mjoq2mR
Update API to correctly register blueprints for evidence and login
dn53
c18dddf
Refactor blueprint registration in app.py to use '/api' prefix for evidence_bp, login_bp, and syslog_bp. Modify api/evidence.py to instantiate Attestation and UploadSession objects using attribute assignment instead of dictionary-like access.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 13d753dc-bbfa-446f-bcd5-3d5325a591ad
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/2fb4ea93-ac3a-4c8e-a374-bb86029c18ef/13d753dc-bbfa-446f-bcd5-3d5325a591ad/dmlZHLS
Update attestation creation to provide upload URLs
dn53
131b347
Modify the API and user interface to allow users to create attestations, receive a pre-signed URL for file uploads, and then confirm completion.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 13d753dc-bbfa-446f-bcd5-3d5325a591ad
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/2fb4ea93-ac3a-4c8e-a374-bb86029c18ef/13d753dc-bbfa-446f-bcd5-3d5325a591ad/RCkflcP
Add user management with admin controls and per-user attestation viewing
dn53
05734d8
Implement user creation by admin, allow users to generate their own API keys, and restrict attestation visibility to individual users.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 13d753dc-bbfa-446f-bcd5-3d5325a591ad
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/2fb4ea93-ac3a-4c8e-a374-bb86029c18ef/13d753dc-bbfa-446f-bcd5-3d5325a591ad/LaW6ISR
Link uploads to specific sessions for reliable storage
dn53
f6179ef
Update `generate_upload_url` to accept and use `session_id` for all storage backends, resolving "Upload session not found" errors.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 13d753dc-bbfa-446f-bcd5-3d5325a591ad
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/2fb4ea93-ac3a-4c8e-a374-bb86029c18ef/13d753dc-bbfa-446f-bcd5-3d5325a591ad/tv6c5K6
Ensure user IDs are correctly converted to integers for all operations
dn53
8372b4a
Ensure user IDs are correctly converted to integers across various API endpoints, including upload initiation, file uploads, and attestation creation, to maintain data integrity and prevent authentication errors.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 13d753dc-bbfa-446f-bcd5-3d5325a591ad
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/2fb4ea93-ac3a-4c8e-a374-bb86029c18ef/13d753dc-bbfa-446f-bcd5-3d5325a591ad/PLB0JIA