Zend Server for IBM i is a 32 bit program, which means it is limited to file sizes around 2 GB. This example shows how to use the split command in PASE to break the file into smaller chunks and send them up to AWS. The split command is a standard command in Linux, so this technique would also apply there.
Any version of Zend Server for IBM i.
The way to accomplish this with 32 bit PHP is to 'chunk' the file. To 'chunk' the file means to break it up into smaller pieces, and transmit the pieces. PASE uses the 'split' command to break up the file. Then the AWS SDK provides for sending the pieces. You can read the AWS documentation here:
Chunking the file is fairly straightforward. Here is the format for the PASE command:
You end up with files having prefix_aa, prefix_ab, so you can then pass each chunk to uploadPart, and finally call completeUpload and you’re done. Here is an example PASE session:
So you call Aws\S3\S3Client::createMultipartUpload() which will initialize the upload and give you an upload id.
Then call Aws\S3\S3Client::uploadPart()with a chunk and a part number, iteratively or in parallel for all the chunks.
Finally you call Aws\S3\S3Client::completeMultipartUpload() to finalize the upload.
For code examples and more information, please refer to the AWS documentation in the above link.