Skip to content
Discussion options

You must be logged in to vote

Well, it looks like I got it. Thanks to your help @maennchen it was easier than I thought it would be.

I found an AWS low level multipart upload example in the official documentation and that helped me to know how to use the required commands.

Following your advice, I implemented a StreamInterface that, whenever it reaches a limit, uploads a part within that multipart upload. Here is the code:

<?php

declare(strict_types=1);

use Aws\S3\S3ClientInterface;
use Psr\Http\Message\StreamInterface;

use function strlen;
use function substr;

final class MultipartUploadBufferStream implements StreamInterface
{
    private const int PART_SIZE = 5242880; // 5 MiB in bytes

    private string $buffer…

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
5 replies
@rubenrubiob
Comment options

@maennchen
Comment options

@rubenrubiob
Comment options

@maennchen
Comment options

@rubenrubiob
Comment options

Comment options

You must be logged in to vote
4 replies
@maennchen
Comment options

@rubenrubiob
Comment options

@maennchen
Comment options

@rubenrubiob
Comment options

Answer selected by maennchen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants