Affects Version/s: 7.0.0 Beta 8, Master
LPS-60649 for the same issue in 6.2
Steps to reproduce:
- Configure portal to use S3Store
- Go to DM section in the control panel
- Upload a big document (>1GB).
In Liferay 7 we use AWS api to interact with S3. As AWS api documentation says,
When uploading directly from an input stream, content length must be specified before data can be uploaded to Amazon S3. If not provided, the library will have to buffer the contents of the input stream in order to calculate it. Amazon S3 explicitly requires that the content length be sent in the request headers before any of the data is sent.
The upload is quite slow and makes it mandatory to have enough memory to store the whole file.
Knowing the file size is thus crucial to achieve upload performance.
In addition, AWS API supports multi-part upload, which makes the upload operation more efficient and robust.