Skip to content

Support fetching partial file contents (HTTP Range request header) #12

@clue

Description

@clue

We should provide optional arguments to fetch parts of a file like this:

$promise = $s3->read(string $file, int $offset = 0, ?int $length);
$stream = $s3->readStream(string $file, int $offset = 0, ?int $length);

For example, we could use this to read the first 500 bytes or last 500 bytes respectively:

$first = $s3->read($file, 0, 500);
$last = $s3->read($file, -500);

See also

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needednew featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions