Document Storage & Photo Automation
Collect visa photos and passport scans from your clients through the intake link, validate them as they're uploaded, and let the agent submit the photo to the official DS-160 portal automatically.
Every DS-160 form has two document slots — an application photo and a passport scan. You and your clients can manage them through the dashboard or the client intake link, and when a submission runs, the agent uploads the photo to the State Department’s Photo Submission System automatically.
1. Document slots
| Slot | Wire name | Format | Size limit | Used by |
|---|---|---|---|---|
| Application photo | applicationPhoto | JPEG | 240 KB | The agent uploads this to DS-160 |
| Passport scan | passportScan | JPEG, PNG, or PDF | 10 MB | Kept on file for your records |
Each form holds at most one active document per slot. Uploading a new one soft-deletes the previous version — the file is removed from object storage, the metadata stays for the audit trail.
2. Where clients upload
When you generate a client intake link, the client sees a Documents step alongside the questionnaire. They can:
- Drop or pick a file for each slot
- See validation results in-line (size, format, basic biometric checks for the photo)
- Replace or delete what they’ve uploaded
- Continue completing the questionnaire while documents are still missing — uploads are independent of the rest of the form
The client never sees a storage URL or any agency credentials. Authentication is scoped to their intake token; uploads from one client link can’t touch documents on another form.
3. Application photo — what we check
The photo runs through the same validator that powers the public US Visa Photo Checker. Hard rejections (the upload fails):
- File is not a JPEG, or is outside 10 KB – 240 KB
- Pixel dimensions outside 600×600 – 1200×1200, or aspect ratio is not square
- Image is not sRGB / 24-bit color
- JPEG compression ratio above 20:1 (over-compressed)
- Background is not mostly white / off-white
- No face detected, multiple faces, head outside 50–69% of the image height, eyes closed, or a profile shot (when face detection is enabled)
Advisory warnings (the upload succeeds, but the client sees a heads-up):
- Image is not 300 DPI — only required for printed photos (DS-260 immigrant visa, in-person interview); not enforced for digital DS-160 uploads
- Image would print at a size other than 2×2 inches — same context as DPI
- EXIF metadata suggests the photo may be older than six months
- Image is saved as a progressive JPEG
- Photo appears under- or over-exposed, or has unusually low contrast
- Face is not centered in the frame
The warning text is translated into the client’s selected language; you’ll see the same text in their language in the audit log.
4. Passport scan — what we check
The validator only looks at file shape:
- Detected MIME type (via magic-byte sniff, not just the extension) is JPEG, PNG, or PDF
- Size is at or below 10 MB
- File is not empty
No OCR, no biometric checks. The passport scan is for your records — we don’t read or parse its contents.
5. Storage
Documents are encrypted at rest.
Deleting a document — or replacing it with a new upload — removes the file from storage immediately. We keep a metadata row for the audit log, but the file itself is gone the moment you confirm the delete.
6. Automated photo upload
When the agent runs a submission with an application photo attached, it now drives the State Department’s Photo Submission System end-to-end. You see two new steps in the submission progress view:
- Upload Photo — the agent opens the State Department’s photo system, sends the JPEG, and waits for the quality-check result.
- Confirm Photo — the agent returns to the DS-160 form and advances past the Confirm Photo screen.
Both appear in the step list after the form-section steps and before the Review/Sign phase. They behave like every other step: success / failure status, timestamps, and the standard retry-on-failure flow.
When the steps run
The photo steps are added to the active step list only if the form has an applicationPhoto document attached at the time the agent fetches its job parameters. Forms without a photo skip both steps — the agent submits the rest of the form, then stops at the Photo phase as before.
If you attach a photo after a submission has already started, the agent that’s already running won’t pick it up; cancel and resubmit to re-fetch parameters.
When the State Department rejects the photo
If the State Department’s photo system rejects the upload (its quality engine occasionally rejects photos that pass our pre-validation — we’re stricter on file shape, looser on biometric edge cases), the agent fails the Upload Photo step with the State Department’s rejection message attached. You’ll see the failure in the submission progress view with the State Department’s exact wording, so you know whether to ask the client for a new photo or whether there’s a sub-pixel issue in the validator.
7. Audit trail
Every upload, replacement, and deletion is logged to the field audit log with:
- The slot involved (
applicationPhoto/passportScan) - The source (
client_linkwith the link JTI, orauthenticated_userwith the user ID and email) - A timestamp
- The new document’s filename and size
Open Form Overview → Audit Log to see the full sequence of edits — questionnaire fields and documents share the same timeline.