Compress photo captures so they fit the 7MB upload cap - #267
Open
jasonvanwyk wants to merge 1 commit into
Open
Conversation
The in-app camera and gallery picker both request quality 1 (uncompressed), so modern phone cameras produce 8-15MB JPEGs that FileUpload's 7MB size check then rejects — users cannot attach a photo taken with the phone at all. Quality 0.5 re-encodes a 12MP capture to roughly 2-4MB. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EyvTUatQCeaxXTA33qKQ4q
👷 Deploy request for atlasjs-home pending review.Visit the deploys page to approve it
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
InAppCamera.tsxcallstakePictureAsync({ quality: 1 })andFileUpload.tsxopens the gallery picker withquality: 1— both uncompressed. Modern phone cameras (12–200MP) produce 8–15MB JPEGs at that setting, andFileUpload.tsx'smaxFileSize = 7check then rejects them:Net effect: on many current devices it is impossible to attach a photo taken with the phone — every capture fails the size check. Reproduced on a Samsung Galaxy A-series taking a work-order image.
Fix
Request
quality: 0.5from both the in-app camera and the gallery picker. A 12MP capture re-encodes to roughly 2–4MB — comfortably under the existing cap, with no visible quality loss for maintenance-evidence photos. The 7MB check is kept as a backstop.Test plan
🤖 Generated with Claude Code
https://claude.ai/code/session_01EyvTUatQCeaxXTA33qKQ4q