Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-1251

Uploaded Document Size is determined and stored wrong

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Auto Closed
    • None
    • None
    • None

    Description

      While writing the (new) DocumentTest working on FINERACT-1218 for FINERACT-1201, I've noticed that the fileSize which the DocumentManagementApiResource.createDocument() puts into the DocumentCommand to hand the DocumentWritePlatformService.createDocument() to save in the DB is wrong.

      The size of the uploaded document is NOT @HeaderParam("Content-Length") @Parameter(description = "Content-Length").

      The same mistake is made in and will have to be fixed in the DocumentManagementApiResource.updateDocument() method

      The DocumentTest currently just "compensates" for the currently wrong size.

      PS: The ImagesApiResource has a similar bug, but it's less important there because the fileSize is only used to validate that no huge images are uploaded, and not actually stored in the database, so it doesn't matter that much there.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vorburger Michael Vorburger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: