You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AS A User I WANT to be able to see the Filesize in Kilobyte of a document SO THAT i can decide if i want to download it or not
1. Enhance POST
POST Endpoint to be adjusted: /api/registration/application/{applicationId}/documentType/{documentTypeId}/documents
API should store Length in Kilobyte.
New Databasefield in table documents -> document_size type Long
2. Enhance GET
GET Endpoints to be adjusted: /api/registration/application/{applicationId}/documentType/{documentTypeId}/documents /api/registration/documents/{documentId}
add new field -> sizeDocument
return value documents.document_size
3. Update existing files
Execute SQL script to update the documents.document_size field for existing entries.
Acceptance Criteria
I can retrieve the size of a document via the GET documents api
I can store the size of a document via the POST documents api
I can see the size of the already uploaded documents with the GET api
unit tests are provided.
Testing
Test Case 1: Retrieve the document Size of a new Document Objective: Ensure that the endpoint is adjusted properly. Steps:
Upload a new document
make a GET request to /api/registration/documents/{documentId}
Expected Result:
The response code is 200 and the response includes sizeDocument
Test Case 2: Retrieve the document Size of an old Document Objective: Ensure that the existing documents where updated properly by the script Steps:
Search a document that was existing before the adjustment
make a GET request to /api/registration/documents/{documentId}
Expected Result: The response code is 200 and the response includes sizeDocument
Description
AS A User I WANT to be able to see the Filesize in Kilobyte of a document SO THAT i can decide if i want to download it or not
1. Enhance POST
POST Endpoint to be adjusted:
/api/registration/application/{applicationId}/documentType/{documentTypeId}/documents
API should store Length in Kilobyte.
New Databasefield in table
documents
->document_size
type Long2. Enhance GET
GET Endpoints to be adjusted:
/api/registration/application/{applicationId}/documentType/{documentTypeId}/documents
/api/registration/documents/{documentId}
add new field ->
sizeDocument
return value
documents.document_size
3. Update existing files
Execute SQL script to update the
documents.document_size
field for existing entries.Acceptance Criteria
Testing
Test Case 1: Retrieve the document Size of a new Document
Objective: Ensure that the endpoint is adjusted properly.
Steps:
/api/registration/documents/{documentId}
Expected Result:
The response code is 200 and the response includes
sizeDocument
Test Case 2: Retrieve the document Size of an old Document
Objective: Ensure that the existing documents where updated properly by the script
Steps:
/api/registration/documents/{documentId}
Expected Result: The response code is 200 and the response includes
sizeDocument
Additional Information
Related to eclipse-tractusx/portal-frontend#921
The text was updated successfully, but these errors were encountered: