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

How to upload 500 MB file on the server using SFTP driver (file system) #171

Open
PrajapatiDhara1510 opened this issue Nov 5, 2024 · 0 comments

Comments

@PrajapatiDhara1510
Copy link

I want to upload a file with around size of 500MB on the server using SFTP driver. It should be in chunk of 50MB because due to cloudflare limit I cannot upload high chunk size. I to achieve it?

I have configured SFTP server details on filesystems.php file

'sftp_medverse' => [
            'driver' => 'sftp',
            'port' => 990,
            'host' => env('SFTP_HOST'),
            'username' => env('SFTP_USERNAME'),
            'privateKey' => '',
            'password' => env('SFTP_PASSWORD'),
            'root' => '/var/www/html/files',
            'timeout' => 30,
        ],

I was doing something like below before uploading in chunk size. But I want to upload file in chunk size.

Storage::disk('sftp_medverse')->put($fileNameToStore, fopen($file, 'r+w+'));

Please help me? Can I achieve it using this package?

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

1 participant