AAuditPro Suite· Jobs manual
Jobs manual Files + comments

Files — what attaches where

ScopeUse forPath on disk
Job-levelTB import, signed engagement letter, management letter, FS packstorage/jobs/{id}/{folder}/{uuid}.{ext}
Task-levelProcedure-specific evidence (bank confirmation, stock count cert, signed reconciliation)storage/jobs/{id}/tasks/{taskid}/{uuid}.{ext}
Checklist-item-levelOne-file-per-item proof (per item)storage/jobs/{id}/checklist/{itemid}/{uuid}.{ext}
Workpaper-level (M19)Audit evidence linked to a specific workpaperstorage/jobs/{id}/workpapers/{wpcode}/{uuid}.{ext}

Upload pipeline

  1. Drag-drop or click

    From the Files tab → drag-drop area or "Choose file". Multiple files supported (sequential upload).

  2. Profile lookup

    Server reads the job_attachment file_upload_profile row → max size (default 25 MB), allowed extensions (pdf/jpg/png/doc/docx/xls/xlsx/csv/zip), allowed MIME prefixes.

  3. Server-side validation

    Three checks must all pass: extension whitelist, MIME magic-byte sniff, size cap. Fails return a 400 with the specific reason. Never relies on client-supplied content-type.

  4. UUID rename + persist

    Original filename preserved in DB column; physical file renamed to UUID to prevent path-traversal and collisions. SHA-256 computed + stored.

  5. Audit-log entry

    Action m07.attachment.upload with user, file UUID, target type/id.

Download (auth + integrity-checked)

Every download goes through:

Comments — internal vs client-visible

Each comment row has:

1target_type / target_id
Polymorphic

Either job or task. Same comments table serves any scope.

2body
Markdown-lite

Plain text + line breaks. @mention someone to notify. Output through htmlspecialchars().

3is_internal
TINYINT(1)

Internal-only — never shown to client. Useful for review notes, internal discussions, fee discussions.

4created_by + created_at
Audit fields

Author + timestamp. Only the author can edit/delete (within 15 min for delete).

Comment moderation

The unified File Vault — discoverability

All these scattered job/task/workpaper attachments are surfaced in one place via M16 File Vault Explorer at /documents/explorer. Tree view: Clients → Engagements → Year → Phase folder → files. The Vault is read-only across these sources — edits go through the source module that owns the file (M07 / M19 / M04 / M16 vault).

Try this

Open a job → Files tab → upload a 5 MB PDF. Note the upload speed + audit-log entry under Activity tab. Now open File Vault → Explorer → drill into Clients → that client → that job → the same PDF appears (with a "Job file" badge). One source, two access points.

Watch out

Be careful with is_internal. If you write "fee should have been higher" in a non-internal comment and your client gets a portal login later, they'll see it. Default to is_internal=1 for anything sensitive.

Tip — task-level evidence

For audit work, attach evidence at checklist-item level, not job-level. Reason: when a regulator inspects, they ask "where's the evidence for procedure X?" — having it nested under the procedure is a 1-click answer. Job-level is the right scope only for whole-engagement files (signed engagement letter, FS pack, audit report).