PHP bug when streaming a large remote file

Created on 7 March 2024, 10 months ago
Updated 21 March 2024, 9 months ago

Problem/Motivation

When a large file is requested the contents returned is malformed. This appears to be a bug in PHP and relative to its default chunk size of 8192. The first chunk seems to be repeated.

Steps to reproduce

Proposed resolution

In order to address this we can store the contents of the file returned from the SFTP client's get method into memory and return the resource for that. I've also added in an additional option for storing the file locally in the event of the remote file not being able to be fetched. In either case we're no longer directly streaming the file using the sftp protocol.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇦🇺Australia mortim07

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024