Skip to content

Commit

Permalink
fix: set content length for multi-part upload request
Browse files Browse the repository at this point in the history
  • Loading branch information
igdianov committed Nov 26, 2022
1 parent 57648a4 commit d8a38f7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ public void putMultipartContent(HttpServletRequest request, HttpServletResponse

ContentService contentService = contentServiceFactory.getContentService(storeResource);

headers.setContentLength(multiPart.getSize());

handleMultipart(request, response, headers,
contentService,
multiPart.getResource(),
Expand All @@ -144,6 +146,8 @@ public void postMultipartContent(HttpServletRequest request, HttpServletResponse

ContentService contentService = contentServiceFactory.getContentService(storeResource);

headers.setContentLength(multiPart.getSize());

handleMultipart(request, response, headers,
contentService,
new InputStreamResource(multiPart.getInputStream(), multiPart.getOriginalFilename()),
Expand Down

0 comments on commit d8a38f7

Please sign in to comment.