Skip to content

Conversation

@Johnbin89
Copy link
Contributor

@Johnbin89 Johnbin89 commented Jan 1, 2026

R2 Photo Upload Functionality

  • Added methods to R2 storage service for photo uploads to Cloudflare R2
  • Created reusable UploadPhotosComponent with drag-and-drop support using Ant Design Dragger
  • Integrated photo upload in Create/Edit Dive and Create/Edit Dive Site pages
  • Photos are uploaded to R2 on form submission, with local base64 previews during editing
  • Added endpoints for R2-only photo uploads for dives and dive sites
  • Updated dive media endpoints to generate presigned URLs for R2 paths

Media Management Enhancements

  • Added "Manage Media" collapsible sections for existing media in Edit Dive and Edit Dive Site
  • Added "Add External Links" collapsible sections for adding photo/video URLs
  • External links support both direct URLs and Flickr URLs (with automatic conversion)
  • Media descriptions are editable inline in the Manage Media section
  • Pending media are displayed (yellow border) before saving
  • Flickr URL conversion helper to get flickr static image link from Flickr share URL/User photo URL

Media Display Improvements

  • Added Lightbox(Gallery) component for photo viewing with navigation
  • Photos and videos are on different Tabs

Permission & Authorization Fixes

  • Fixed dive site edit permissions to allow owners (in addition to admins/moderators)

UI/UX Improvements

  • Refactored OrganizationCard to use Ant Design Drawer component for certification levels
  • Drawer opens on card click or via "View certifications" button
  • Fixed boolean field conversion issues on dive_site Edit (is_private select field)

Implements: #55

Johnbin89 and others added 25 commits December 29, 2025 13:20
- Install missing `antd` and `@ant-design/icons` dependencies.
- Install `eslint-import-resolver-exports` to properly resolve subpath exports.
- Update ESLint configuration to use the exports resolver, fixing import errors for `yet-another-react-lightbox`.
- Create `backend/tests/test_r2_images_links.py` to cover:
  - `get_photo_url` logic for local, R2 presigned, and R2 public URLs.
  - `upload_photo` logic including R2 upload and local fallback.
  - `delete_photo` logic for both R2 and local storage.
- Ensure comprehensive test coverage for new R2 storage service features.
@kargig kargig merged commit 10ceefc into kargig:main Jan 1, 2026
2 checks passed
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