Glossary
useUploadProgress New React hook (packages/clinic-mobile/src/hooks/useUploadProgress.js) that tracks bytes sent/expected across one or more concurrent uploads and derives a percent and detail string for display. See Knowing how far along an upload is.
handleUploadFile Existing function (packages/clinic-mobile/src/components/dashboard/patients/patient/files/handleUploadFile.js) that uploads a file to either Google Drive or a presigned S3 POST, depending on the company's settings. This PR added an onProgress callback to it and changed the S3 route's transport mechanism. See Streaming the bytes instead of buffering them.
AppSpinner Shared loading-overlay component (packages/clinic-mobile/src/common/AppSpinner.js) used throughout the mobile app. This PR added a detail prop, rendered as a second line of text below the existing percentage line.
Upload ID An arbitrary string key (usually a generated file name, or name-uri when names might collide) used to track one upload's { sent, total } separately from others in the same batch inside useUploadProgress's internal state.
S3 route The default file-storage path: the server hands the app a presigned S3 POST request (via the SIGN_S3 mutation), and the app uploads the file directly to S3. Used by any clinic that hasn't connected Google Drive.
Google Drive route The alternate file-storage path, used when a company has googleDriveAuth configured — files are uploaded to the clinic's connected Google Drive via a resumable upload session instead of S3.
createUploadTask An expo-file-system API that streams a file from disk during upload and reports progress via a callback ({ totalBytesSent, totalBytesExpectedToSend }), unlike a fetch/FormData request, which buffers the whole body first and (on iOS) reports it as sent in one event. This PR switched the S3 route from the latter to the former.
Batch One or more uploads tracked together by a single useUploadProgress() instance. percent/detail reflect combined progress across every upload still in flight, not any single file.