Support the ongoing development of Laravel.io →
posted 9 years ago
Configuration

Hi, I've been 2 weeks try to solving this problem. In windows (using xampp) i manage to retrieve video files (MP4) from storage api and served to client using route :

 
Route::get('fileentry/get/{filename}', [
	'as' => 'getentry', 'uses' => 'FileEntryController@get']);
 

and

public function get($filename){
	
		$entry = Fileentry::where('filename', '=', $filename)->firstOrFail();
		$file = Storage::disk('local')->get($entry->filename);
 
		return (new Response($file, 200))
              ->header('Content-Type', $entry->mime);
	}

but when i deploy to my server with nginx as webserver that turned out error 404.

My nginx conf based on laravel documentation and my storage path permission is 775 with user www-data and group www-data.

Please share if you have a solution to this problem.

PS : i used this Tutorial in here

Thanks :)

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ivokun ivokun Joined 22 Jun 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.