Upload File
Endpoint
Authentication
Requires active user session (isLoggedIn middleware).Request Body
The PDF file to upload. Must be in PDF format.
The evaluation ID to associate the document with.
The document type ID from the catalog (cat_dgo_documentos).
Encrypted evaluation data for redirect purposes.
File Upload Configuration
- Content Type:
multipart/form-data - Max File Size: 20 MB (20,000,000 bytes)
- Accepted Formats: PDF only
- Storage Location:
src/public/uploads/ - Naming Strategy: UUID v4 + day + month +
.pdf- Example:
550e8400-e29b-41d4-a716-446655440000823.pdf
- Example:
Response
Redirects to
/evaluacionvLife/evaluacionView/{enctyptedData} on success.“Documento cargado con exito” - Displayed on successful upload.
Error Responses
Error message displayed to the user.
Implementation Details
Multer Configuration (app.js:64-85)tbl_dgo_uploads table:
evalID: Evaluation identifierdocumentoID: Document type identifieruploadFileName: Generated UUID filename
Delete File
Endpoint
Authentication
Requires active user session (isLoggedIn middleware).Request Body
The unique identifier of the upload record to delete.
Response
“Documento borrado con exito” - Displayed on successful deletion.
Redirects back to the previous page.
Error Response
Database Operation
uploadActivo flag to 0 rather than removing the record.
Get File Upload View
Endpoint
Authentication
Requires active user session (isLoggedIn middleware).Path Parameters
The document type ID to retrieve information for.
Encrypted evaluation data (ncrypt-js encrypted string).
Response
Returns an HTML view (fileUpload/fileUploadView) with:
Current user’s name from session.
The encrypted data passed in the URL.
Decrypted evaluation ID.
The document type identifier.
Document type information from
cat_dgo_documentos catalog.Legend number (only included when documentoID = 8).
Database Query
Income Reason Management
Add Income Reason
Endpoint
Request Body
The evaluation ID.
Description of the income reason.
Encrypted evaluation data for redirect.
Response
“Se guardo motivo” - Displayed on success.
Delete Income Reason
Endpoint
Request Body
The evaluation ID to remove income reasons for.
Response
“Motivo eliminado” - Displayed on successful deletion.