Skip to content

v0.1.44 - Upload API DELETE Endpoints

Choose a tag to compare

@quanhua92 quanhua92 released this 24 Nov 16:48
· 703 commits to main since this release

🗑️ DELETE Endpoints for Upload API

This release adds DELETE operations to the Upload API, completing the CRUD functionality.

New Endpoints

Delete Individual Files:

  • DELETE /uploads/{session_id}/markdown/{filename}?secret={secret} - Delete specific markdown file
  • DELETE /uploads/{session_id}/images/{filename}?secret={secret} - Delete specific image file

Delete Sessions:

  • DELETE /uploads/{session_id}?secret={secret} - Delete entire session (all files + metadata)

Security

  • All DELETE operations require secret authentication
  • Returns 403 Forbidden if secret is invalid
  • Returns 404 Not Found if session/file doesn't exist
  • Proper session existence validation before access checks

Testing

  • 19 upload API tests (increased from 13)
  • All DELETE operations tested with correct/wrong secrets
  • Session deletion properly removes all files and metadata
  • Proper HTTP status codes for all error scenarios

Files Changed

  • src/server/upload.rs (+270 lines): DELETE handlers + response structs
  • src/server/mod.rs: Route registration for DELETE endpoints
  • docs/UPLOAD_API.md (+103 lines): Complete DELETE endpoint documentation
  • scripts/test-upload.sh (+87 lines): 6 new DELETE tests
  • CLAUDE.md: Updated test documentation

Full Changelog

  • d26daa2 Add DELETE endpoints for upload API
  • d66915b Add Upload API with secret-based authentication (previous release)

See UPLOAD_API.md for complete API documentation.