feature(photography): accept Canon/Nikon/Sony/Fuji/DNG raws on upload — widen allowlist + Raw-kind heuristic (no LibRaw needed on ingest) #754

Closed
opened 2026-07-21 01:13:17 +00:00 by spikerj · 1 comment
Owner

Asked: "are we using LibRaw for other camera formats?" Answer: LibRaw IS in the stack via rawpy, but only in the artpipe PhotoStack develop worker (models/PhotoStack/stack_pipeline/develop.py, RAW_EXTENSIONS = .orf/.dng/.nef/.cr2/.cr3/.arw/.raf). The photography UPLOAD path doesn't need LibRaw — exiftool already handles metadata + embedded PreviewImage/ThumbnailImage extraction generically for virtually all manufacturers, and ExifToolOutputParser was written with generic fallbacks. The only Olympus locks:

  1. Photography:AllowedFileTypes allowlist = .orf/.tif/.tiff/.jpg/.jpeg (PhotographStagingService + appsettings) — rejects .cr3/.nef/.arw/.raf/.dng at the door.
  2. Kind heuristic is literally extension == ".orf" (UploadPhotographCommandHandler) — anything else classifies Developed.

Fix: add .dng/.nef/.cr2/.cr3/.arw/.raf to the allowlist + content-type map, and replace the .orf literal with a shared RawPhotoExtensions set mirroring the artpipe list. MakerNote-only fields (StackedImage, FocusStepCount…) stay null for other brands by design; raws with no embedded preview get no tile (same as .orf today; LibRaw-based preview rendering = possible later enhancement).

Repo: spikersoft-backend

Asked: "are we using LibRaw for other camera formats?" Answer: LibRaw IS in the stack via rawpy, but only in the artpipe PhotoStack develop worker (`models/PhotoStack/stack_pipeline/develop.py`, RAW_EXTENSIONS = .orf/.dng/.nef/.cr2/.cr3/.arw/.raf). The photography UPLOAD path doesn't need LibRaw — exiftool already handles metadata + embedded PreviewImage/ThumbnailImage extraction generically for virtually all manufacturers, and ExifToolOutputParser was written with generic fallbacks. The only Olympus locks: 1. `Photography:AllowedFileTypes` allowlist = .orf/.tif/.tiff/.jpg/.jpeg (PhotographStagingService + appsettings) — rejects .cr3/.nef/.arw/.raf/.dng at the door. 2. Kind heuristic is literally `extension == ".orf"` (UploadPhotographCommandHandler) — anything else classifies Developed. Fix: add .dng/.nef/.cr2/.cr3/.arw/.raf to the allowlist + content-type map, and replace the .orf literal with a shared RawPhotoExtensions set mirroring the artpipe list. MakerNote-only fields (StackedImage, FocusStepCount…) stay null for other brands by design; raws with no embedded preview get no tile (same as .orf today; LibRaw-based preview rendering = possible later enhancement). Repo: spikersoft-backend
Author
Owner

Shipped — spikersoft-backend PR #439 merged (06c23c6b): photography uploads now accept .dng .nef .cr2 .cr3 .arw .raf alongside .orf/.tif/.tiff/.jpg/.jpeg (allowlist + content-type map, config override preserved), and Raw-kind classification uses the shared RawPhotoExtensions set kept in sync with the artpipe PhotoStack RAW_EXTENSIONS (the rawpy/LibRaw develop leg that already handles these formats). No LibRaw needed on ingest — exiftool metadata + embedded-preview extraction were already format-agnostic. MakerNote-only fields (StackedImage, FocusStep*) remain Olympus-populated by design; raws without an embedded preview get no tile (same as .orf, LibRaw-based preview rendering noted as a possible later enhancement).

Closing.

Shipped — spikersoft-backend PR #439 merged (`06c23c6b`): photography uploads now accept `.dng .nef .cr2 .cr3 .arw .raf` alongside `.orf/.tif/.tiff/.jpg/.jpeg` (allowlist + content-type map, config override preserved), and Raw-kind classification uses the shared `RawPhotoExtensions` set kept in sync with the artpipe PhotoStack `RAW_EXTENSIONS` (the rawpy/LibRaw develop leg that already handles these formats). No LibRaw needed on ingest — exiftool metadata + embedded-preview extraction were already format-agnostic. MakerNote-only fields (StackedImage, FocusStep*) remain Olympus-populated by design; raws without an embedded preview get no tile (same as .orf, LibRaw-based preview rendering noted as a possible later enhancement). Closing.
Sign in to join this conversation.