Fix jcloud content length is inaccurate#8619
Conversation
josegar74
left a comment
There was a problem hiding this comment.
I haven't test it with JCloud. but the code changes look fine.
@tylerjmchugh just to confirm before you merge it, this change only affects the JCloud store, correct?
|
@josegar74 In this PR, there is simply a new fileSize field added to LimitedInputStream object which will not affect other storage. Jcloud is the only storage where the api's require the stream and the size to be supplied. All others seems to simply read the stream until no more data exists. So I don't see how this change can possibly affect other storage. |
|
@josegar74 Yes it should not affect any other stores. All the stores should have access to the new field now but only jcloud store needs it / takes advantage of it. |
|
@tylerjmchugh thanks for the clarification. It looks good to merge it. |
Currently the content length for uploading resources to jcloud is set using the InputStream.available function which is unreliable. This results in uploads ending pre-maturely.
This PR aims to fix this issue by passing the content length to the input stream so the jcloud store can use that value if it is known.
Checklist
mainbranch, backports managed with labelREADME.mdfilespom.xmldependency management. Update build documentation with intended library use and library tutorials or documentation