Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReadStream, writesteam not creating files until complete download #273

Closed
sankarsuda opened this issue Oct 3, 2014 · 2 comments
Closed

Comments

@sankarsuda
Copy link

Hi I am using readstream, writestream functions to download 1Gb+ files from sftp server.

$manager->writeStream('local://'.$entry['basename'],
                        $manager->readStream('sftp://'.$entry['basename'])
        );

When we initiate the request file is not creating in location until it download complete file into memory.
If the file size is big existing with fatal error.

Is there any way create file immediately and start writing into file without using much memory?

@frankdejonge
Copy link
Member

@2stech this is because phpseclib didn't accept streams at the time. I'll check if this is still the case, after which this can be updated. The lib back then only supported file locations (which can't be used cross adapter) and strings. The last is why you see the memory spike.

@sankarsuda
Copy link
Author

@FrenkyNet i will also check is there any way i can achieve. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants