v2 first commit

This commit is contained in:
denisdulici
2019-11-16 10:21:14 +03:00
parent 5b23e9c2c4
commit 6d50fa8442
3075 changed files with 3451681 additions and 65594 deletions

View File

@ -2,7 +2,7 @@
namespace App\Http\Controllers\Common;
use App\Http\Controllers\Controller;
use App\Abstracts\Http\Controller;
use Illuminate\Http\Request;
use App\Models\Common\Media;
use File;
@ -21,12 +21,12 @@ class Uploads extends Controller
try {
$media = Media::find($id);
} catch (\Exception $e) {
return false;
return response(null, 204);
}
// Get file path
if (!$path = $this->getPath($media)) {
return false;
return response(null, 204);
}
return response()->file($path);