Overview
The Sistema de Abogados allows you to upload, store, and manage PDF documents for both cases (Casos) and expedientes (conciliation files). Documents are organized separately for each case or expediente, making it easy to maintain a complete file for each matter.Document Storage Structure
Documents are stored in different locations based on their type:- Case Documents: Stored in
public/documentoCaso/ - Expediente Documents: Stored in
public/documento/
All uploaded documents must be in PDF format with a maximum file size of 15MB (15,200KB).
Uploading Case Documents
Select Document Type
Choose the document type from the dropdown:
- Contract
- Evidence
- Court Filing
- Correspondence
- Other legal documents
Choose PDF File
Click “Choose File” and select a PDF document from your computer.File requirements:
- Format: PDF only
- Maximum size: 15MB (15,200KB)
Case Document Validation
Uploading Expediente Documents
Expediente documents have additional metadata fields specific to conciliation proceedings.Add Acta Information (Optional)
For meeting minutes and actas, you can specify:
- Acta Type (
tipo_acta): Type of meeting record - Acta Number (
n_acta): Sequential number for the acta - Folio (
folio): Page or folio reference number
Expediente Document Validation
Viewing Documents
You can view documents directly in your browser without downloading them.
View Routes:
- Case documents:
/caso/file/{uuid} - Expediente documents:
/conciliacion/expediente/file/{uuid}
Downloading Documents
Download documents to save them locally on your computer.
Download Routes:
- Case documents:
/caso/file/download/{uuid} - Expediente documents:
/conciliacion/expediente/file/download/{uuid}
Documents are accessed securely using UUID identifiers rather than sequential IDs, preventing unauthorized access.
Editing Document Metadata
You can update document information without re-uploading the file.File Replacement Process
When you upload a new file during editing:- The system checks if the old file exists
- The old file is deleted from the server
- The new file is uploaded with a timestamp prefix
- The database record is updated with the new filename
Deleting Documents
What Happens During Deletion
- System checks if the file exists on disk
- Physical file is deleted from
documentoCaso/ordocumento/directory - Database record is removed
- Confirmation message is displayed
File Naming Convention
The system automatically generates unique filenames using timestamps:1709998234_contract_signed.pdf
This prevents filename conflicts and maintains original filename information.
Document Organization Best Practices
For Cases
- Categorize Properly: Use consistent document types for similar documents
- Descriptive Names: Name files clearly before uploading (e.g., “plaintiff_complaint.pdf” instead of “doc1.pdf”)
- Add Descriptions: Always add a brief description explaining the document’s relevance
- Upload Chronologically: Upload documents in the order they were created or received
- Regular Reviews: Periodically review and archive old documents
For Expedientes
- Use Acta Numbers: Assign sequential acta numbers for meeting minutes
- Track Folios: Use folio numbers to maintain page references
- Type Classification: Properly categorize document types for easy filtering
- Meeting Documentation: Upload meeting minutes immediately after sessions
- Version Control: When updating documents, use clear version indicators in descriptions
File Security
Access Control
- Documents are only accessible to authenticated users with appropriate roles
- UUID-based URLs prevent unauthorized enumeration of documents
- Case documents require
encargado,admin, orabogadorole - Expediente documents require
encargado,admin, orasistenterole
Storage Security
- Files are stored outside the web root when possible
- Direct file access is controlled through application routes
- File existence checks prevent information disclosure
- Automatic cleanup when documents are deleted
Troubleshooting
Upload Fails
Problem: Document upload returns an error Solutions:- Verify file is PDF format
- Check file size is under 15MB
- Ensure you have proper permissions
- Check available disk space on server
Cannot View Document
Problem: PDF won’t open in browser Solutions:- Try downloading instead of viewing
- Check browser PDF viewer settings
- Ensure file was uploaded successfully
- Verify UUID is correct in the URL
File Size Too Large
Problem: Error about file exceeding maximum size Solutions:- Compress the PDF using online tools
- Split large documents into smaller files
- Remove unnecessary images or pages
- Contact administrator to increase upload limit
Technical Reference
Case Documents
Controller:CasoDocumentoController.php
Routes:
- Upload form:
GET /caso/caso/{caso}/file - Store document:
POST /caso/caso/{caso} - Edit form:
GET /caso/file/{file}/edit - Update document:
PUT /caso/{file}/file - Delete document:
DELETE /caso/{caso}/file - View document:
GET /caso/file/{uuid} - Download document:
GET /caso/file/download/{uuid}
CasoDocumento
Storage Path: public/documentoCaso/
Expediente Documents
Controller:ExpedienteDocumentosController.php
Routes:
- Upload form:
GET /conciliacion/expediente/{expediente}/file - Store document:
POST /conciliacion/expediente/{expediente} - Edit form:
GET /conciliacion/expediente/file/{file}/edit - Update document:
PUT /conciliacion/expediente/{file}/file - Delete document:
DELETE /conciliacion/expediente/{expediente}/file - View document:
GET /conciliacion/expediente/file/{uuid} - Download document:
GET /conciliacion/expediente/file/download/{uuid}
ExpedienteDocumento
Storage Path: public/documento/