Skip to content

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

Open
@PrajapatiDhara1510

Description

@PrajapatiDhara1510

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions