Performance issue with streaming files from digial ocean storage in laravel 5.5

I am using digital ocean space for storing files. I am having performance issue while reading files from there, specially streaming files in a route. Here is my code structure.

Default Driver:

FILESYSTEM_DRIVER=digitalocean

Disk Config:

'digitalocean' => [
'driver' => 's3',
'key' => env('DIGITALOCEAN_SPACES_KEY'),
'secret' => env('DIGITALOCEAN_SPACES_SECRET'),
'endpoint' => env('DIGITALOCEAN_SPACES_ENDPOINT'),
'region' => env('DIGITALOCEAN_SPACES_REGION'),
'bucket' => env('DIGITALOCEAN_SPACES_BUCKET'),
],

Controller function:

public function view($path)
{
return Storage::response($filePath);
}

This is really slow since it fetches file from the cloud storage and then streams in a url. Is there any way to speedup the process ?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3A6sfCx
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

How to Create Treeview with Bootstrap and jQuery

jQuery Datatables with PHP, MySQL and AJAX Example

How to Add Images to Dropdown List using jQuery